Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752140AbWCGLNs (ORCPT ); Tue, 7 Mar 2006 06:13:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752150AbWCGLNs (ORCPT ); Tue, 7 Mar 2006 06:13:48 -0500 Received: from ns2.suse.de ([195.135.220.15]:27620 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1752140AbWCGLNr (ORCPT ); Tue, 7 Mar 2006 06:13:47 -0500 Date: Tue, 07 Mar 2006 12:13:45 +0100 Message-ID: From: Takashi Iwai To: Andrew Morton Cc: Dave Jones , linux-kernel@vger.kernel.org Subject: Re: fix usbmixer double kfree. In-Reply-To: <20060306164111.5510fc09.akpm@osdl.org> References: <20060306084951.GA15905@redhat.com> <20060306164111.5510fc09.akpm@osdl.org> 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 (beta21) (corn) (+CVS-20050720) (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 Content-Length: 714 Lines: 26 At Mon, 6 Mar 2006 16:41:11 -0800, Andrew Morton wrote: > > Dave Jones wrote: > > > > snd_ctl_add() kfree's the kcontrol already if we fail there, > > so this driver is currently doing a double kfree. > > Well sometimes it does. If we hit one of those snd_assert() abominations, > snd_ctl_add() will return error without freeing the kcontrol. Indeed. I'll fix them later. > Still, a leak is better than a double-free. Yep :) thanks, Takashi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/