[SHELL32]
authorAmine Khaldi <amine.khaldi@reactos.org>
Sat, 28 Jun 2014 09:57:09 +0000 (09:57 +0000)
committerAmine Khaldi <amine.khaldi@reactos.org>
Sat, 28 Jun 2014 09:57:09 +0000 (09:57 +0000)
* Plug a leak. CID 1206904.
CORE-7975

svn path=/trunk/; revision=63652

reactos/dll/win32/shell32/folders/fonts.cpp

index c8ea368..43e5f2d 100644 (file)
@@ -609,7 +609,10 @@ HRESULT WINAPI CFontsFolder::GetDetailsOf(LPCITEMIDLIST pidl, UINT iColumn, SHEL
                         {
                             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);