fix resource leak, CID 611
authorKamil Hornicek <kamil.hornicek@reactos.org>
Sat, 18 Oct 2008 21:07:45 +0000 (21:07 +0000)
committerKamil Hornicek <kamil.hornicek@reactos.org>
Sat, 18 Oct 2008 21:07:45 +0000 (21:07 +0000)
svn path=/trunk/; revision=36813

reactos/base/shell/explorer/services/startup.c

index 207b4a0..6176be6 100644 (file)
@@ -349,6 +349,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
     {
         printf("Couldn't allocate memory for the value names\n");
 
+        free(szCmdLine);
         res=ERROR_NOT_ENOUGH_MEMORY;
         goto end;
     }
@@ -388,6 +389,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete,
         printf("Done processing cmd #%ld\n", i);
     }
 
+    free(szValue);
     res=ERROR_SUCCESS;
 
 end: