r9816: Work on testsuite for upgrade
[samba.git] / source / lib / samba3 / samba3.c
index 8d5ad7718586812bf97408c803ca3c63176c1fcf..b9bb6d736215eea398558a0d7651868b8650a33d 100644 (file)
@@ -88,9 +88,12 @@ NTSTATUS samba3_read(const char *libdir, const char *smbconf, TALLOC_CTX *ctx, s
 
        ret = talloc_zero(ctx, struct samba3);
 
-       if (smbconf) {
+       if (smbconf != NULL) {
                ret->configuration = param_init(ret);
-               param_read(ret->configuration, smbconf);
+               if (param_read(ret->configuration, smbconf) == -1) {
+                       talloc_free(ret);
+                       return NT_STATUS_UNSUCCESSFUL;
+               }
        }
 
        dbfile = talloc_asprintf(ctx, "%s/account_policy.tdb", libdir);