From: Imre Deak Date: Wed, 30 Mar 2011 12:37:04 +0000 (+0300) Subject: gpu: pvr: fix error path in PVRSRVOpenBCDeviceKM X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be34366a0710e004b3f09ae75a678d3cbd735627;p=sgx.git 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 --- 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; }