Commit 8788cca0 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

rsaenh: Use LocalFree to free memory return by Crypt(Un)ProtectData.

parent 5408471b
...@@ -895,7 +895,7 @@ static void store_key_pair(HCRYPTKEY hCryptKey, HKEY hKey, LPCSTR szValueName, D ...@@ -895,7 +895,7 @@ static void store_key_pair(HCRYPTKEY hCryptKey, HKEY hKey, LPCSTR szValueName, D
{ {
RegSetValueExA(hKey, szValueName, 0, REG_BINARY, RegSetValueExA(hKey, szValueName, 0, REG_BINARY,
blobOut.pbData, blobOut.cbData); blobOut.pbData, blobOut.cbData);
HeapFree(GetProcessHeap(), 0, blobOut.pbData); LocalFree(blobOut.pbData);
} }
} }
HeapFree(GetProcessHeap(), 0, pbKey); HeapFree(GetProcessHeap(), 0, pbKey);
...@@ -1135,7 +1135,7 @@ static BOOL read_key_value(HCRYPTPROV hKeyContainer, HKEY hKey, LPCSTR szValueNa ...@@ -1135,7 +1135,7 @@ static BOOL read_key_value(HCRYPTPROV hKeyContainer, HKEY hKey, LPCSTR szValueNa
{ {
ret = RSAENH_CPImportKey(hKeyContainer, blobOut.pbData, blobOut.cbData, 0, 0, ret = RSAENH_CPImportKey(hKeyContainer, blobOut.pbData, blobOut.cbData, 0, 0,
phCryptKey); phCryptKey);
HeapFree(GetProcessHeap(), 0, blobOut.pbData); LocalFree(blobOut.pbData);
} }
} }
HeapFree(GetProcessHeap(), 0, pbKey); HeapFree(GetProcessHeap(), 0, pbKey);
......
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