diff options
Diffstat (limited to 'source4/lib/samba3/samba3.c')
-rw-r--r-- | source4/lib/samba3/samba3.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/lib/samba3/samba3.c b/source4/lib/samba3/samba3.c index 8d5ad77185..b9bb6d7362 100644 --- a/source4/lib/samba3/samba3.c +++ b/source4/lib/samba3/samba3.c @@ -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); |