diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-09-26 12:51:49 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:59:19 -0500 |
commit | 729d17c27013eae731a97ac8413135c93244bca6 (patch) | |
tree | dbbc2f65aab1e085bed1e4e6070928d366fdf719 /source4 | |
parent | 9f0638c0cf49afcc91ead4674bd4b458586553c9 (diff) | |
download | samba-729d17c27013eae731a97ac8413135c93244bca6.tar.gz samba-729d17c27013eae731a97ac8413135c93244bca6.tar.bz2 samba-729d17c27013eae731a97ac8413135c93244bca6.zip |
r2664: fixed the final server leak for normal operation. We now get a clean report from --leak-check
(This used to be commit 1ff41bbcae8dc7514a85d69679e44dc7c5b0342f)
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/raw/smb_signing.c | 10 | ||||
-rw-r--r-- | source4/smb_server/signing.c | 3 |
2 files changed, 8 insertions, 5 deletions
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); } diff --git a/source4/smb_server/signing.c b/source4/smb_server/signing.c index 555a71c0a9..5d18d44f4b 100644 --- a/source4/smb_server/signing.c +++ b/source4/smb_server/signing.c @@ -67,7 +67,8 @@ BOOL srv_setup_signing(struct smbsrv_connection *smb_conn, if (!set_smb_signing_common(&smb_conn->signing)) { return False; } - return smbcli_simple_set_signing(&smb_conn->signing, session_key, response); + return smbcli_simple_set_signing(smb_conn, + &smb_conn->signing, session_key, response); } void srv_signing_restart(struct smbsrv_connection *smb_conn, |