Commit 11f5ed28 authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

winmm: Fix some memory leaks.

parent 22e9da0d
......@@ -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;
}
/******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment