1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r17620: Fix two C++ Warnings and a memleak

(This used to be commit d7246284e0)
This commit is contained in:
Volker Lendecke 2006-08-20 17:08:37 +00:00 committed by Gerald (Jerry) Carter
parent f636002282
commit 7119823403

View File

@ -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;