diff options
author | Pierre Peiffer <pierre.peiffer@stericsson.com> | 2011-09-13 13:22:43 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-05-22 11:07:00 +0200 |
commit | f34c96d7190b1c30bd5ef5cc880706af0d06d2a3 (patch) | |
tree | 0d90007d7408411163a33b860c73c778127aa0f8 | |
parent | 8bbaaf6aa2dce9eef6467bdcb129c7493a3ce813 (diff) |
U8500 CM: always release the loadmap entry
When releasing a component, its loadmap entry is not released
if a corruption is detected.
Free this entry in any case to avoid any leakage even in case
corruption.
ST-Ericsson ID: 361414
ST-Ericsson Linux next: NA
ST-Ericsson FOSS-OUT ID: Trivial
Signed-off-by: Pierre Peiffer <pierre.peiffer@stericsson.com>
Change-Id: Ifbf60e88b4875fffeff50a896a862f850e06227f
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32585
Reviewed-by: Pierre PEIFFER <pierre.peiffer@stericsson.com>
Tested-by: Pierre PEIFFER <pierre.peiffer@stericsson.com>
-rw-r--r-- | drivers/staging/nmf-cm/cm/engine/elf/src/mmdsp-debug.c | 8 |
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; } |