From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964834AbWEOIjV (ORCPT ); Mon, 15 May 2006 04:39:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964830AbWEOIjV (ORCPT ); Mon, 15 May 2006 04:39:21 -0400 Received: from cantor2.suse.de ([195.135.220.15]:62867 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S964835AbWEOIjU (ORCPT ); Mon, 15 May 2006 04:39:20 -0400 Date: Mon, 15 May 2006 10:39:18 +0200 Message-ID: From: Takashi Iwai To: Jesper Juhl Cc: Jaroslav Kysela , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org Subject: Re: [Alsa-devel] [PATCH] Fix a memory leak in pdaudiocf In-Reply-To: <200605132344.25862.jesper.juhl@gmail.com> References: <200605132344.25862.jesper.juhl@gmail.com> User-Agent: Wanderlust/2.12.0 (Your Wildest Dreams) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta25) (eggplant) (+CVS-20060326) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org At Sat, 13 May 2006 23:44:25 +0200, Jesper Juhl wrote: > > There's a potential memory leak in > sound/pcmcia/pdaudiocf/pdaudiocf.c::pdacf_config() > > If we leave via one of the *failed: labels we may leak 'parse', so add a > kfree(parse) to the end of the function and also make sure to set 'parse' > to NULL after the kfree() call a little further up so we don't do a > double-free of the pointer if we hit one of the *failed: labels after the > first kfree(). > > Since I don't have the hardware I can't test the patch beyond making sure > it compiles cleanly, but I feel pretty confident that it is correct. > > Please consider for inclusion. This bug was already fixed in a different way on ALSA HG repo. thanks, Takashi