Skip to content

Commit

Permalink
[CM] Fix memory leak during 3D surface allocation
Browse files Browse the repository at this point in the history
Fix memory leak during 3D surface allocation

Change-Id: I4453b0f1088c02fb80e580f22c96b45293a03b52
  • Loading branch information
HeFan2017 authored and intel-mediadev committed Jun 4, 2019
1 parent 987459e commit b579a70
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions media_driver/agnostic/common/cm/cm_hal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9885,6 +9885,10 @@ MOS_STATUS HalCm_Free3DResource(

// Get the Buffer Entry
CM_CHK_MOSSTATUS_GOTOFINISH(HalCm_Get3DResourceEntry(state, handle, &entry));
if (state->advExecutor)
{
state->advExecutor->Delete2Dor3DStateMgr(entry->surfStateMgr);
}

osInterface->pfnFreeResourceWithFlag(osInterface, &entry->osResource, SURFACE_FLAG_ASSUME_NOT_IN_USE);

Expand Down

0 comments on commit b579a70

Please sign in to comment.