s3: rpc_client: Allocate struct db_context * off the local frame, as all other variab...
authorJeremy Allison <jra@samba.org>
Mon, 24 Jul 2017 19:58:29 +0000 (12:58 -0700)
committerJeremy Allison <jra@samba.org>
Wed, 26 Jul 2017 19:35:22 +0000 (21:35 +0200)
On success, netlogon_creds_cli_set_global_db() reparents it to a long-lived context.

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>
source3/rpc_client/cli_netlogon.c

index d17c6c0c1ae5d17219729f9682e39e5b4a4dff0f..719b98584f3ef8aa59adaed7b7f1f1d35e2fefa3 100644 (file)
@@ -67,7 +67,7 @@ NTSTATUS rpccli_pre_open_netlogon_creds(void)
                return NT_STATUS_NO_MEMORY;
        }
 
-       global_db = db_open(talloc_autofree_context(), fname,
+       global_db = db_open(frame, fname,
                            0, TDB_CLEAR_IF_FIRST|TDB_INCOMPATIBLE_HASH,
                            O_RDWR|O_CREAT, 0600, DBWRAP_LOCK_ORDER_2,
                            DBWRAP_FLAG_OPTIMIZE_READONLY_ACCESS);