From patchwork Thu Aug 4 07:14:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Reding X-Patchwork-Id: 1034152 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p747EvTN002736 for ; Thu, 4 Aug 2011 07:14:57 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752263Ab1HDHOz (ORCPT ); Thu, 4 Aug 2011 03:14:55 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:57905 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752082Ab1HDHOa (ORCPT ); Thu, 4 Aug 2011 03:14:30 -0400 Received: from localhost (p548E06E4.dip0.t-ipconnect.de [84.142.6.228]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LwXB1-1RRDY212Ol-017cjW; Thu, 04 Aug 2011 09:14:29 +0200 From: Thierry Reding To: linux-media@vger.kernel.org Subject: [PATCH 18/21] [staging] tm6000: Plug memory leak on PCM free. Date: Thu, 4 Aug 2011 09:14:16 +0200 Message-Id: <1312442059-23935-19-git-send-email-thierry.reding@avionic-design.de> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> References: <1312442059-23935-1-git-send-email-thierry.reding@avionic-design.de> X-Provags-ID: V02:K0:/fJYp4ISXBkV0kEylRwC9oPwjeCjEHRZzU6BhpIAdDb OGppUHbHbXtdwoSVSnUWMQzpIv2uDBu0wPK6OYZBbpnVZoz6wQ HfU/1CAKayWXniUbhssjVLUwnbebn700a2xlrD9YxhzL2FDg5z weU338k4qbnwys/nOJziHZbC7pZnQzBesK2znJLknlltwgtXnX L9sGQ3m6p4QPZYdCvHzvAsezP7TpdDYTPYA74t8heGgMxmLupo PGNHdhWdYteGY Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 04 Aug 2011 07:14:58 +0000 (UTC) When releasing hardware resources, the DMA buffer allocated to the PCM device needs to be freed to prevent a memory leak. --- drivers/staging/tm6000/tm6000-alsa.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/staging/tm6000/tm6000-alsa.c b/drivers/staging/tm6000/tm6000-alsa.c index 35ad1f0..2bf21600 100644 --- a/drivers/staging/tm6000/tm6000-alsa.c +++ b/drivers/staging/tm6000/tm6000-alsa.c @@ -308,6 +308,7 @@ static int snd_tm6000_hw_free(struct snd_pcm_substream *substream) schedule_work(&core->wq_trigger); } + dsp_buffer_free(substream); return 0; }