Fix memory leaks

Change-Id: Id67d5375bedc6e6c10082d9c5ee69d6e932be158
This commit is contained in:
Julien Nabet
2014-04-29 10:14:12 +02:00
parent 5c1c297fa2
commit 11b81c1026

View File

@@ -93,6 +93,7 @@ WCHAR* getPathFromRegistryKey( HKEY hroot, LPCWSTR subKeyName )
if ( RegQueryValueEx( hkey, NULL, NULL, &type, (LPBYTE) data, &size ) != ERROR_SUCCESS )
{
RegCloseKey( hkey );
delete[] data;
return NULL;
}
@@ -287,6 +288,7 @@ extern "C" FARPROC WINAPI delayLoadHook(
szLibName = new WCHAR[size];
if (! MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, pdli->szDll, -1, szLibName, size))
{
delete[] szLibName;
return 0;
}
}