Fix mapping "leak" in newly introduced win32_globallookup.

This commit is contained in:
Andy Polyakov 2006-01-01 18:38:59 +00:00
parent a1f3462bc0
commit 302ea8c260

View File

@ -809,7 +809,12 @@ static DSO_FUNC_TYPE win32_globallookup(const char *name)
module_next = (MODULE32)GetProcAddress(dll,"Module32Next");
hModuleSnap = (*create_snap)(TH32CS_SNAPMODULE,0);
if( hModuleSnap == INVALID_HANDLE_VALUE ) return NULL;
if( hModuleSnap == INVALID_HANDLE_VALUE )
{
FreeLibrary(dll);
DSOerr(DSO_F_PATHBYADDR,DSO_R_UNSUPPORTED);
return NULL;
}
me32.dwSize = sizeof(me32);