Fix memory leak.
authorJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 23:14:26 +0000 (00:14 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sun, 2 Nov 2008 23:14:26 +0000 (00:14 +0100)
source4/param/loadparm.c

index 1ab842c8f897688e3079e19ae3dd7b57aebc1a27..d660141efc82bb5c291301de972f625e6d9ab6ee 100644 (file)
@@ -2687,7 +2687,7 @@ _PUBLIC_ struct dcerpc_server_info *lp_dcerpc_server_info(TALLOC_CTX *mem_ctx, s
 
 struct gensec_settings *lp_gensec_settings(TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx)
 {
-       struct gensec_settings *settings = talloc(NULL, struct gensec_settings);
+       struct gensec_settings *settings = talloc(mem_ctx, struct gensec_settings);
        if (settings == NULL)
                return NULL;
        SMB_ASSERT(lp_ctx != NULL);