Commit 9b00fce4 authored by Christian Costa's avatar Christian Costa Committed by Alexandre Julliard

Fix installable driver removal.

parent 5a8d7674
......@@ -259,7 +259,7 @@ BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDe
reg_driver_list = driver;
return TRUE;
oom:
oom:
HeapFree(GetProcessHeap(), 0, driver);
return FALSE;
}
......@@ -270,7 +270,8 @@ BOOL VFWAPI ICInstall(DWORD fccType, DWORD fccHandler, LPARAM lParam, LPSTR szDe
BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags)
{
reg_driver** pdriver;
reg_driver* drv;
TRACE("(%s,%s,0x%08x)\n", wine_dbgstr_fcc(fccType), wine_dbgstr_fcc(fccHandler), wFlags);
/* Check if a driver is already registered */
......@@ -284,9 +285,10 @@ BOOL VFWAPI ICRemove(DWORD fccType, DWORD fccHandler, UINT wFlags)
return FALSE;
/* Remove the driver from the list */
drv = *pdriver;
*pdriver = (*pdriver)->next;
HeapFree(GetProcessHeap(), 0, (*pdriver)->name);
HeapFree(GetProcessHeap(), 0, *pdriver);
HeapFree(GetProcessHeap(), 0, drv->name);
HeapFree(GetProcessHeap(), 0, drv);
return TRUE;
}
......
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