Commit 1ac70967 authored by Pierre Schweitzer's avatar Pierre Schweitzer Committed by Alexandre Julliard

msacm32: Fix buffer double free.

parent f566f38e
......@@ -1016,6 +1016,9 @@ PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPAR
PWINE_ACMLOCALDRIVERINST pDrvInst;
pDrvInst = HeapAlloc(MSACM_hHeap, 0, sizeof(WINE_ACMLOCALDRIVERINST));
if (!pDrvInst)
return NULL;
pDrvInst->pLocalDriver = paldrv;
pDrvInst->dwDriverID = 0;
pDrvInst->pNextACMInst = NULL;
......@@ -1037,9 +1040,14 @@ PWINE_ACMLOCALDRIVERINST MSACM_OpenLocalDriver(PWINE_ACMLOCALDRIVER paldrv, LPAR
ret = MSACM_OpenLocalDriver(paldrv, lParam2);
if (!ret)
{
MSACM_CloseLocalDriver(pDrvInst);
ERR("load1 failed\n");
goto exit;
/* If MSACM_CloseLocalDriver returns TRUE,
* then pDrvInst has been freed
*/
if (!MSACM_CloseLocalDriver(pDrvInst))
goto exit;
return NULL;
}
pDrvInst->bSession = TRUE;
return ret;
......
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