[PATCH 4/5][omapzoom] BRIDGE Memory leak fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Hari Kanigeri <h-kanigeri2@xxxxxx>
Date: Fri, 31 Oct 2008 21:32:07 -0500
Subject: [PATCH] BRIDGE Memory leak fix

There is a memory leak when loading a new base image.

Installing and uninstalling the bridge driver on ARM side for over
10^5 number of times, resulted in the system becoming unstable
after that.

The PROC_OBJECT structure is being freed without freeing
the memory held by the internal pointer g_pszLastCoff.

Bug details reported by Lam SuiLun.

Signed-off-by: Hari Kanigeri <h-kanigeri2@xxxxxx>
---
 drivers/dsp/bridge/rmgr/proc.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c
index 5bc87a7..eb7781d 100644
--- a/drivers/dsp/bridge/rmgr/proc.c
+++ b/drivers/dsp/bridge/rmgr/proc.c
@@ -641,6 +641,11 @@ DSP_STATUS PROC_Detach(DSP_HPROCESSOR hProcessor)
 		if (pProcObject->hNtfy)
 			NTFY_Delete(pProcObject->hNtfy);
 
+		if (pProcObject->g_pszLastCoff) {
+			MEM_Free(pProcObject->g_pszLastCoff);
+			pProcObject->g_pszLastCoff = NULL;
+		}
+
 		/* Remove the Proc from the DEV List */
 		(void)DEV_RemoveProcObject(pProcObject->hDevObject,
 			(u32)pProcObject);
-- 
1.6.0
--
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

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux