diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-08-20 17:08:37 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:38:44 -0500 |
commit | 711982340390f5dae8b3778d28fc0f4733e25221 (patch) | |
tree | 65105a8993026593196ad95a93ca01750d749899 | |
parent | f6360022828306dd54332377c011ccd3634b23c6 (diff) | |
download | samba-711982340390f5dae8b3778d28fc0f4733e25221.tar.gz samba-711982340390f5dae8b3778d28fc0f4733e25221.tar.bz2 samba-711982340390f5dae8b3778d28fc0f4733e25221.zip |
r17620: Fix two C++ Warnings and a memleak
(This used to be commit d7246284e0117f7a97b3cbb80ff45b532559bf63)
-rw-r--r-- | source3/libsmb/ntlmssp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source3/libsmb/ntlmssp.c b/source3/libsmb/ntlmssp.c index fd639ffd9f..70fcd24e76 100644 --- a/source3/libsmb/ntlmssp.c +++ b/source3/libsmb/ntlmssp.c @@ -162,9 +162,13 @@ NTSTATUS ntlmssp_set_hashes(NTLMSSP_STATE *ntlmssp_state, const unsigned char lm_hash[16], const unsigned char nt_hash[16]) { - ntlmssp_state->lm_hash = TALLOC_MEMDUP(ntlmssp_state->mem_ctx, lm_hash, 16); - ntlmssp_state->nt_hash = TALLOC_MEMDUP(ntlmssp_state->mem_ctx, nt_hash, 16); + ntlmssp_state->lm_hash = (unsigned char *) + TALLOC_MEMDUP(ntlmssp_state->mem_ctx, lm_hash, 16); + ntlmssp_state->nt_hash = (unsigned char *) + TALLOC_MEMDUP(ntlmssp_state->mem_ctx, nt_hash, 16); if (!ntlmssp_state->lm_hash || !ntlmssp_state->nt_hash) { + TALLOC_FREE(ntlmssp_state->lm_hash); + TALLOC_FREE(ntlmssp_state->nt_hash); return NT_STATUS_NO_MEMORY; } return NT_STATUS_OK; |