From patchwork Thu Jan 21 13:03:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ameya Palande X-Patchwork-Id: 74321 X-Patchwork-Delegate: omar.ramirez@ti.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0LD4uco009867 for ; Thu, 21 Jan 2010 13:04:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752357Ab0AUNEz (ORCPT ); Thu, 21 Jan 2010 08:04:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751954Ab0AUNEz (ORCPT ); Thu, 21 Jan 2010 08:04:55 -0500 Received: from smtp.nokia.com ([192.100.105.134]:65379 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751925Ab0AUNEy (ORCPT ); Thu, 21 Jan 2010 08:04:54 -0500 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0LD4Kit020454; Thu, 21 Jan 2010 07:04:49 -0600 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Jan 2010 15:03:39 +0200 Received: from mgw-da01.ext.nokia.com ([147.243.128.24]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Jan 2010 15:03:39 +0200 Received: from localhost.localdomain (esdhcp041187.research.nokia.com [172.21.41.187]) by mgw-da01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o0LD3ZB1024571; Thu, 21 Jan 2010 15:03:35 +0200 From: Ameya Palande To: linux-omap@vger.kernel.org Cc: omap.ramirez@ti.com, nm@ti.com, deepak.chitriki@ti.com Subject: [PATCH] DSPBRIDGE: Fix memory leak in PROC_AutoStart() Date: Thu, 21 Jan 2010 15:03:10 +0200 Message-Id: <1264078990-4829-1-git-send-email-ameya.palande@nokia.com> X-Mailer: git-send-email 1.6.3.3 X-OriginalArrivalTime: 21 Jan 2010 13:03:39.0456 (UTC) FILETIME=[26789C00:01CA9A9A] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org diff --git a/drivers/dsp/bridge/rmgr/proc.c b/drivers/dsp/bridge/rmgr/proc.c index a75b64a..91ab64f 100644 --- a/drivers/dsp/bridge/rmgr/proc.c +++ b/drivers/dsp/bridge/rmgr/proc.c @@ -512,6 +512,10 @@ DSP_STATUS PROC_AutoStart(struct CFG_DEVNODE *hDevNode, "No Exec file found \n"); } func_cont: + if (hProcObject->g_pszLastCoff) { + MEM_Free(hProcObject->g_pszLastCoff); + hProcObject->g_pszLastCoff = NULL; + } MEM_FreeObject(hProcObject); func_end: GT_1trace(PROC_DebugMask, GT_ENTER,