fix resource leak, CID 611

svn path=/trunk/; revision=36813
This commit is contained in:
Kamil Hornicek 2008-10-18 21:07:45 +00:00
parent 290a31c692
commit aa7f022cbc

View file

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