diff options
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/netlogon/schannel_state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/rpc_server/netlogon/schannel_state.c b/source4/rpc_server/netlogon/schannel_state.c index 1153e4043d..0900c05393 100644 --- a/source4/rpc_server/netlogon/schannel_state.c +++ b/source4/rpc_server/netlogon/schannel_state.c @@ -68,7 +68,7 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, return NT_STATUS_NO_MEMORY; } - asprintf(&s, "%u", (unsigned int)expiry); + s = talloc_asprintf(mem_ctx, "%u", (unsigned int)expiry); if (s == NULL) { talloc_free(ldb); @@ -97,6 +97,8 @@ NTSTATUS schannel_store_session_key(TALLOC_CTX *mem_ctx, ret = ldb_add(ldb->ldb, &msg); + talloc_free(s); + if (ret != 0) { DEBUG(0,("Unable to add %s to session key db - %s\n", msg.dn, ldb_errstring(ldb->ldb))); |