From 9b00fce4803e511c38eb2c9d1fd23797b241b5c7 Mon Sep 17 00:00:00 2001 From: Christian Costa Date: Mon, 17 Oct 2005 08:55:05 +0000 Subject: [PATCH] Fix installable driver removal. --- dlls/msvideo/msvideo_main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/msvideo/msvideo_main.c b/dlls/msvideo/msvideo_main.c index 92c8cc5f9bf..a0afb5505ed 100644 --- a/dlls/msvideo/msvideo_main.c +++ b/dlls/msvideo/msvideo_main.c @@ -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; }