summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c b/drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c
index 26e66c4a640..1342e9e0155 100644
--- a/drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c
+++ b/drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c
@@ -296,7 +296,10 @@ t_cm_error cm_DSPABI_RemoveLoadMap(
ERROR("Memory corruption in MMDSP: at data DSP address=%x or ARM address=%x\n",
prevItemReferenceDspAddress, prevItemReference, 0, 0, 0, 0);
- return CM_OK;
+ /* free the entry anyway to avoid leakage */
+ cm_DM_Free(((t_component_instance *)componentHandle)->loadMapHandle, TRUE);
+
+ return CM_OK;
}
curItem = (struct LoadMapItem*)((curItemDspAdress - headerOffsets[coreId]) * 2 + (t_uint32)headerAddresses[coreId]); // To ARM address
@@ -346,6 +349,9 @@ t_cm_error cm_DSPABI_RemoveLoadMap(
ERROR("Memory corruption in MMDSP: component not in LoadMap %s\n", localname, 0, 0, 0, 0, 0);
+ /* free the entry anyway to avoid leakage */
+ cm_DM_Free(((t_component_instance *)componentHandle)->loadMapHandle, TRUE);
+
return CM_OK;
}