diff options
author | Volker Lendecke <vlendec@samba.org> | 2004-11-04 09:30:13 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:08 -0500 |
commit | 5ec9dfbf9466bb1d0c0188ec8cd6db4ba9f67f99 (patch) | |
tree | 4c89c8485ce8524388fa8616c84f378ead84379c | |
parent | a8d28cf0cff1048b0dba632c3c13a5c70844d7e8 (diff) | |
download | samba-5ec9dfbf9466bb1d0c0188ec8cd6db4ba9f67f99.tar.gz samba-5ec9dfbf9466bb1d0c0188ec8cd6db4ba9f67f99.tar.bz2 samba-5ec9dfbf9466bb1d0c0188ec8cd6db4ba9f67f99.zip |
r3525: Fix a memleak
Volker
(This used to be commit 4c4da26aa19bedcbb52ed3e6d43ca380a7c1603c)
-rw-r--r-- | source3/libsmb/ntlm_check.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/libsmb/ntlm_check.c b/source3/libsmb/ntlm_check.c index a0ca08fb89..26e4c76fd3 100644 --- a/source3/libsmb/ntlm_check.c +++ b/source3/libsmb/ntlm_check.c @@ -93,6 +93,7 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response, uchar value_from_encryption[16]; uchar client_response[16]; DATA_BLOB client_key_data; + BOOL res; if (part_passwd == NULL) { DEBUG(10,("No password set - DISALLOWING access\n")); @@ -146,7 +147,10 @@ static BOOL smb_pwd_check_ntlmv2(const DATA_BLOB *ntv2_response, dump_data(100, value_from_encryption, 16); #endif data_blob_clear_free(&client_key_data); - return (memcmp(value_from_encryption, client_response, 16) == 0); + res = (memcmp(value_from_encryption, client_response, 16) == 0); + if ((!res) && (user_sess_key != NULL)) + data_blob_clear_free(user_sess_key); + return res; } /** |