atl: memory leak on failure path (copy pasta?)
spotted by Samuel Serapion
CORE-8212
 

svn path=/trunk/; revision=63483
This commit is contained in:
Christoph von Wittich 2014-05-27 21:20:39 +00:00
parent af35d7f046
commit dad0af61d4

View file

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