Author: akhaldi
Date: Sat Jun 28 09:57:09 2014
New Revision: 63652
URL:
http://svn.reactos.org/svn/reactos?rev=63652&view=rev
Log:
[SHELL32]
* Plug a leak. CID 1206904.
CORE-7975
Modified:
trunk/reactos/dll/win32/shell32/folders/fonts.cpp
Modified: trunk/reactos/dll/win32/shell32/folders/fonts.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/folders/…
==============================================================================
--- trunk/reactos/dll/win32/shell32/folders/fonts.cpp [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/folders/fonts.cpp [iso-8859-1] Sat Jun 28 09:57:09
2014
@@ -609,7 +609,10 @@
{
psd->str.pOleStr = (LPWSTR)CoTaskMemAlloc(wcslen(buffer) +
1);
if (!psd->str.pOleStr)
+ {
+ CloseHandle(hFile);
return E_OUTOFMEMORY;
+ }
wcscpy(psd->str.pOleStr, buffer);
psd->str.uType = STRRET_WSTR;
CloseHandle(hFile);