Author: pschweitzer
Date: Sat Apr 5 12:58:10 2014
New Revision: 62617
URL:
http://svn.reactos.org/svn/reactos?rev=62617&view=rev
Log:
[RAPPS]
Don't leak handle
CID #716310
Modified:
trunk/reactos/base/applications/rapps/parser.c
Modified: trunk/reactos/base/applications/rapps/parser.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/rapps/pa…
==============================================================================
--- trunk/reactos/base/applications/rapps/parser.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/rapps/parser.c [iso-8859-1] Sat Apr 5 12:58:10 2014
@@ -617,7 +617,10 @@
cch = wcslen(buffer) + 1;
CurProfile->filename = HeapAlloc(GetProcessHeap(), 0, cch * sizeof(WCHAR));
if (CurProfile->filename == NULL)
+ {
+ if (hFile != INVALID_HANDLE_VALUE) CloseHandle(hFile);
return FALSE;
+ }
StringCchCopyW(CurProfile->filename, cch, buffer);