Author: cwittich
Date: Tue May 27 21:20:39 2014
New Revision: 63483
URL:
http://svn.reactos.org/svn/reactos?rev=63483&view=rev
Log:
[atl]
atl: memory leak on failure path (copy pasta?)
spotted by Samuel Serapion
CORE-8212
Modified:
trunk/reactos/lib/atl/statreg.h
Modified: trunk/reactos/lib/atl/statreg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/atl/statreg.h?rev=6348…
==============================================================================
--- trunk/reactos/lib/atl/statreg.h [iso-8859-1] (original)
+++ trunk/reactos/lib/atl/statreg.h [iso-8859-1] Tue May 27 21:20:39 2014
@@ -272,7 +272,7 @@
{
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;