rsaenh: Fix a memory leak (Valgrind).
Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
ef86011ba4
commit
633779b472
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue