s4: auth: Remove a talloc_autofree_context() use.
authorJeremy Allison <jra@samba.org>
Tue, 9 May 2017 20:28:49 +0000 (13:28 -0700)
committerJeremy Allison <jra@samba.org>
Thu, 11 May 2017 18:30:13 +0000 (20:30 +0200)
Use NULL here, not the autofree context for this
static pointer. The destructor prevents freeing this
memory anyway.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
source4/auth/system_session.c

index 3b9edd779df7a466909ff6af1535d0a594ba6c3e..4c5290db71a5654b54d051cefffff04c559bca91 100644 (file)
@@ -51,7 +51,12 @@ _PUBLIC_ struct auth_session_info *system_session(struct loadparm_context *lp_ct
                return static_session;
        }
 
-       nt_status = auth_system_session_info(talloc_autofree_context(),
+       /*
+        * Use NULL here, not the autofree context for this
+        * static pointer. The destructor prevents freeing this
+        * memory anyway.
+        */
+       nt_status = auth_system_session_info(NULL,
                                             lp_ctx,
                                             &static_session);
        if (!NT_STATUS_IS_OK(nt_status)) {