From be34366a0710e004b3f09ae75a678d3cbd735627 Mon Sep 17 00:00:00 2001 From: Imre Deak Date: Wed, 30 Mar 2011 15:37:04 +0300 Subject: [PATCH] gpu: pvr: fix error path in PVRSRVOpenBCDeviceKM Add missing frees / ref count rollback. Reported-by: Coverity Signed-off-by: Imre Deak Reviewed-by: Pauli Nieminen --- pvr/deviceclass.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pvr/deviceclass.c b/pvr/deviceclass.c index cfbe18e..ed959d7 100644 --- a/pvr/deviceclass.c +++ b/pvr/deviceclass.c @@ -1448,7 +1448,12 @@ err3: sizeof(struct PVRSRV_BC_BUFFER) * sBufferInfo.ui32BufferCount, psBCInfo->psBuffer, NULL); err2: + psBCInfo->psFuncTable->pfnCloseBCDevice(psBCInfo->hExtDevice); err1: + OSFreeMem(PVRSRV_OS_PAGEABLE_HEAP, sizeof(*psBCPerContextInfo), + psBCPerContextInfo, NULL); + psBCInfo->ui32RefCount--; + return eError; } -- 2.39.5