lib: auth: Store the netlogon_creds_cli_global_db pointer on the NULL context.
authorJeremy Allison <jra@samba.org>
Mon, 24 Jul 2017 23:14:00 +0000 (16:14 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 26 Jul 2017 23:34:12 +0000 (01:34 +0200)
Now we shutdown correctly it doesn't need the talloc_autofree_context().

Last use of talloc_autofree_context() ourside the talloc test code !

Please don't add it ever again :-).

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12932

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul 27 01:34:12 CEST 2017 on sn-devel-144

libcli/auth/netlogon_creds_cli.c

index f5350f210b36dbec7f044e840cfadf151070a894..526ee3962fcc22876c8aff8ad0ae45b0abb1dca1 100644 (file)
@@ -208,7 +208,7 @@ NTSTATUS netlogon_creds_cli_set_global_db(struct db_context **db)
                return NT_STATUS_INVALID_PARAMETER_MIX;
        }
 
-       netlogon_creds_cli_global_db = talloc_move(talloc_autofree_context(), db);
+       netlogon_creds_cli_global_db = talloc_move(NULL, db);
        return NT_STATUS_OK;
 }
 
@@ -226,7 +226,7 @@ NTSTATUS netlogon_creds_cli_open_global_db(struct loadparm_context *lp_ctx)
                return NT_STATUS_NO_MEMORY;
        }
 
-       global_db = dbwrap_local_open(talloc_autofree_context(), lp_ctx,
+       global_db = dbwrap_local_open(NULL, lp_ctx,
                                      fname, 0,
                                      TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
                                      O_RDWR|O_CREAT,