[PATCHv2 13/18] DSPBRIDGE: Memory leak in Node Register Notify

Omar Ramirez Luna
2009-12-17T02:08:49Z

From: Ernesto Ramos Falcon <ernesto@ti.com>

Fix for memory leak in DSPNode_RegisterNotify when
unregistering an object.

Signed-off-by: Ernesto Ramos Falcon <ernesto@ti.com>
---
drivers/dsp/bridge/pmgr/wcd.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index 3fb5208..93460d1 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -1403,6 +1403,11 @@ u32 NODEWRAP_RegisterNotify(union Trapped_Args *args)
notification.psName = NULL;
notification.handle = NULL;

+ if (!args->ARGS_PROC_REGISTER_NOTIFY.uEventMask)
+ cp_fm_usr(&notification,
+ args->ARGS_PROC_REGISTER_NOTIFY.hNotification,
+ status, 1);
+
status = NODE_RegisterNotify(args->ARGS_NODE_REGISTERNOTIFY.hNode,
args->ARGS_NODE_REGISTERNOTIFY.uEventMask,
args->ARGS_NODE_REGISTERNOTIFY.uNotifyType,
--
1.6.2.4