From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932136AbWCNJjL (ORCPT ); Tue, 14 Mar 2006 04:39:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751074AbWCNJjL (ORCPT ); Tue, 14 Mar 2006 04:39:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:10662 "EHLO mx2.suse.de") by vger.kernel.org with ESMTP id S1750765AbWCNJjK (ORCPT ); Tue, 14 Mar 2006 04:39:10 -0500 Date: Tue, 14 Mar 2006 10:39:09 +0100 Message-ID: From: Takashi Iwai To: Adrian Bunk Cc: perex@suse.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] sound/: fix some memory leaks In-Reply-To: <20060313222647.GP13973@stusta.de> References: <20060313222647.GP13973@stusta.de> 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 (beta24) (dandelion) (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 Mon, 13 Mar 2006 23:26:47 +0100, Adrian Bunk wrote: > > This patch fixes two memory leaks spotted by the Coverity checker. > > > Signed-off-by: Adrian Bunk > > --- > > sound/drivers/serial-u16550.c | 1 + > sound/isa/es18xx.c | 1 + > sound/pci/cs46xx/dsp_spos.c | 10 +++++++--- > 3 files changed, 9 insertions(+), 3 deletions(-) > > --- linux-2.6.16-rc6-mm1-full/sound/drivers/serial-u16550.c.old 2006-03-13 22:52:25.000000000 +0100 > +++ linux-2.6.16-rc6-mm1-full/sound/drivers/serial-u16550.c 2006-03-13 22:52:59.000000000 +0100 > @@ -789,6 +789,7 @@ static int __init snd_uart16550_create(s > > if ((err = snd_uart16550_detect(uart)) <= 0) { > printk(KERN_ERR "no UART detected at 0x%lx\n", iobase); > + kfree(uart); > return -ENODEV; > } This one may leave a requested region after free. It should be snd_uart16550_free(uart), instead. Others look fine. I'll apply them with the fix above to ALSA tree. Thanks! Takashi