From cd2a7cebed4c4d3d7d5d287c1cd968de8ccc6687 Mon Sep 17 00:00:00 2001 From: XuanJessica Date: Tue, 10 Oct 2023 22:16:59 +0800 Subject: [PATCH] [CM] Fix coverity CM resource leak issue Clean resource leak issue of CM --- media_driver/agnostic/common/cm/cm_kernel_ex.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/media_driver/agnostic/common/cm/cm_kernel_ex.cpp b/media_driver/agnostic/common/cm/cm_kernel_ex.cpp index 28296188d6f..b78ac740288 100644 --- a/media_driver/agnostic/common/cm/cm_kernel_ex.cpp +++ b/media_driver/agnostic/common/cm/cm_kernel_ex.cpp @@ -543,6 +543,7 @@ CmSurfaceState* CmKernelEx::GetSurfaceState(CmSurface *surface, uint32_t index) surfState = MOS_New(CmSurfaceStateVME, cmHalState); if (surfState == nullptr) { + MOS_DeleteArray(vmeValue); return nullptr; } surfState->Initialize((CM_HAL_VME_ARG_VALUE *)vmeValue);