mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
[atl]
atl: memory leak on failure path (copy pasta?) spotted by Samuel Serapion CORE-8212 svn path=/trunk/; revision=63483
This commit is contained in:
@@ -272,7 +272,7 @@ private:
|
||||
{
|
||||
len = MultiByteToWideChar(CP_ACP, 0, regstra, filelen, NULL, 0) + 1;
|
||||
regstrw = reinterpret_cast<LPWSTR>(HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len * sizeof(WCHAR)));
|
||||
if (regstra == NULL)
|
||||
if (regstrw == NULL)
|
||||
{
|
||||
HeapFree(GetProcessHeap(), 0, regstra);
|
||||
return E_OUTOFMEMORY;
|
||||
|
||||
Reference in New Issue
Block a user