From: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx> We free in the tail cleanup, so don't free before jumping there. Signed-off-by: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx> --- drivers/dsp/bridge/rmgr/proc.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index 7bc1bcd..e89077b 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -349,13 +349,11 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, status = DEV_GetWMDContext(hDevObject, &pProcObject->hWmdContext); if (DSP_FAILED(status)) { - MEM_FreeObject(pProcObject); GT_0trace(PROC_DebugMask, GT_7CLASS, "PROC_AutoStart: Failed " "to get WMD Context \n"); } } else { - MEM_FreeObject(pProcObject); GT_0trace(PROC_DebugMask, GT_7CLASS, "PROC_AutoStart: Failed to " "get IntFxns \n"); @@ -377,6 +375,10 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, "CFG_GetAutoStart DSP_FAILED \n"); goto func_cont; } + + /* paranoid - must be able to kfree this on remaining error paths */ + pProcObject->g_pszLastCoff = NULL; + /* Get the default executable for this board... */ DEV_GetDevType(hDevObject, (u32 *)&devType); pProcObject->uProcessor = devType; @@ -406,9 +408,9 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, GT_0trace(PROC_DebugMask, GT_7CLASS, "PROC_AutoStart: " "No Exec file found \n"); } -func_cont: kfree(pProcObject->g_pszLastCoff); pProcObject->g_pszLastCoff = NULL; +func_cont: MEM_FreeObject(pProcObject); func_end: GT_1trace(PROC_DebugMask, GT_ENTER, -- 1.6.0.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html