Author: pschweitzer
Date: Sun Apr 6 13:50:53 2014
New Revision: 62656
URL:
http://svn.reactos.org/svn/reactos?rev=62656&view=rev
Log:
[SYSDM]
Fix memory leaks
CID #716341
CID #716342
Modified:
trunk/reactos/dll/cpl/sysdm/environment.c
Modified: trunk/reactos/dll/cpl/sysdm/environment.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/environment.…
==============================================================================
--- trunk/reactos/dll/cpl/sysdm/environment.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/sysdm/environment.c [iso-8859-1] Sun Apr 6 13:50:53 2014
@@ -199,7 +199,7 @@
lpData = GlobalAlloc(GPTR, (dwMaxValueDataLength + 1) * sizeof(TCHAR));
if (lpData == NULL)
{
- GlobalFree(lpData);
+ GlobalFree(lpName);
RegCloseKey(hKey);
return;
}
@@ -227,6 +227,7 @@
(LPBYTE)lpData,
&dwDataLength))
{
+ GlobalFree(lpExpandData);
GlobalFree(lpName);
GlobalFree(lpData);
RegCloseKey(hKey);