msacm32: Fix buffer double free.
This commit is contained in:
parent
f566f38e2f
commit
1ac7096728
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue