mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 11:43:31 +00:00
winmm: Fix some memory leaks.
This commit is contained in:
parent
22e9da0dd7
commit
11f5ed28cb
1 changed files with 11 additions and 7 deletions
|
@ -2394,16 +2394,20 @@ static LPWINE_DRIVER DRIVER_OpenDriver16(LPCWSTR fn, LPCWSTR sn, LPARAM lParam2)
|
|||
if (lpDrv->d.d16.hDriver16 == 0) {cause = "Not a 16 bit driver"; goto exit;}
|
||||
lpDrv->dwFlags = WINE_GDF_16BIT;
|
||||
|
||||
TRACE("=> %p\n", lpDrv);
|
||||
return lpDrv;
|
||||
|
||||
exit:
|
||||
HeapFree(GetProcessHeap(), 0, lpDrv);
|
||||
HeapFree(GetProcessHeap(), 0, fnA);
|
||||
HeapFree(GetProcessHeap(), 0, snA);
|
||||
TRACE("Unable to load 16 bit module %s[%s]: %s\n",
|
||||
debugstr_w(fn), debugstr_w(sn), cause);
|
||||
return NULL;
|
||||
|
||||
if (cause)
|
||||
{
|
||||
TRACE("Unable to load 16 bit module %s[%s]: %s\n",
|
||||
debugstr_w(fn), debugstr_w(sn), cause);
|
||||
HeapFree(GetProcessHeap(), 0, lpDrv);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
TRACE("=> %p\n", lpDrv);
|
||||
return lpDrv;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
Loading…
Reference in a new issue