From 729d17c27013eae731a97ac8413135c93244bca6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 26 Sep 2004 12:51:49 +0000 Subject: r2664: fixed the final server leak for normal operation. We now get a clean report from --leak-check (This used to be commit 1ff41bbcae8dc7514a85d69679e44dc7c5b0342f) --- source4/libcli/raw/smb_signing.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/libcli') diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c index bd29abe3e6..9ba385e062 100644 --- a/source4/libcli/raw/smb_signing.c +++ b/source4/libcli/raw/smb_signing.c @@ -321,7 +321,8 @@ BOOL smbcli_request_check_sign_mac(struct smbcli_request *req) /*********************************************************** SMB signing - Simple implementation - setup the MAC key. ************************************************************/ -BOOL smbcli_simple_set_signing(struct smb_signing_context *sign_info, +BOOL smbcli_simple_set_signing(TALLOC_CTX *mem_ctx, + struct smb_signing_context *sign_info, const DATA_BLOB *user_session_key, const DATA_BLOB *response) { @@ -332,9 +333,9 @@ BOOL smbcli_simple_set_signing(struct smb_signing_context *sign_info, DEBUG(5, ("SMB signing enabled!\n")); if (response && response->length) { - sign_info->mac_key = data_blob(NULL, response->length + user_session_key->length); + sign_info->mac_key = data_blob_talloc(mem_ctx, NULL, response->length + user_session_key->length); } else { - sign_info->mac_key = data_blob(NULL, user_session_key->length); + sign_info->mac_key = data_blob_talloc(mem_ctx, NULL, user_session_key->length); } memcpy(&sign_info->mac_key.data[0], user_session_key->data, user_session_key->length); @@ -365,7 +366,8 @@ BOOL smbcli_transport_simple_set_signing(struct smbcli_transport *transport, return False; } - return smbcli_simple_set_signing(&transport->negotiate.sign_info, + return smbcli_simple_set_signing(transport, + &transport->negotiate.sign_info, &user_session_key, &response); } -- cgit