diff options
author | Pierre Peiffer <pierre.peiffer@stericsson.com> | 2011-09-13 13:22:43 +0200 |
---|---|---|
committer | Rabin VINCENT <rabin.vincent@stericsson.com> | 2011-09-30 08:57:43 +0200 |
commit | b798c4e4706a6b6388ff154813f98364c2383985 (patch) | |
tree | 15f3b8eb8431ea4b79354a19731ea8f71a338c5d | |
parent | e579e22e4cd613f99c5eff5e2bb79337c5298ba3 (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; } |