Commit 633779b4 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

rsaenh: Fix a memory leak (Valgrind).

parent ef86011b
......@@ -3628,17 +3628,18 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
&pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen);
}
if ( pbData == NULL ) {
*pdwDataLen = pCryptHash->dwHashSize;
return TRUE;
}
if (pbData && (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED))
if (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED)
{
finalize_hash(pCryptHash);
pCryptHash->dwState = RSAENH_HASHSTATE_FINISHED;
}
if (!pbData)
{
*pdwDataLen = pCryptHash->dwHashSize;
return TRUE;
}
return copy_param(pbData, pdwDataLen, pCryptHash->abHashValue,
pCryptHash->dwHashSize);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment