All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ondrej Zary <linux@rainbow-software.org>
To: Eric Sesterhenn <snakebyte@gmx.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [Patch] Memory Leak in sound/isa/es18xx.c
Date: Thu, 28 Sep 2006 00:21:14 +0200	[thread overview]
Message-ID: <200609280021.14839.linux@rainbow-software.org> (raw)
In-Reply-To: <1159371001.9125.2.camel@alice>

On Wednesday 27 September 2006 17:30, Eric Sesterhenn wrote:
> hi,
>
> your patch
> http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdi
>ff;h=1c3985580445ef9225c1ea7714d6d963f7626eeb to add PnP BIOS support to the
> es18xx driver, removed a kfree(cfg) in an error path, was this intentional,
> because coverity flagged it as a memory leak, and i found nothing that
> speaks against it. Attached is a patch to readd the kfree()

Yes, looks just like a stupid bug. Thanks.

> Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
>
> --- linux-2.6.18-git7/sound/isa/es18xx.c.orig	2006-09-27 17:02:57.000000000
> +0200 +++ linux-2.6.18-git7/sound/isa/es18xx.c	2006-09-27
> 17:03:51.000000000 +0200 @@ -2154,6 +2154,7 @@ static int __devinit
> snd_audiodrive_pnpc
>  	}
>  	/* Control port initialization */
>  	if (pnp_activate_dev(acard->devc) < 0) {
> +		kfree(cfg);
>  		snd_printk(KERN_ERR PFX "PnP control configure failure (out of
> resources?)\n"); return -EAGAIN;
>  	}

-- 
Ondrej Zary

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

       reply	other threads:[~2006-09-27 22:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1159371001.9125.2.camel@alice>
2006-09-27 22:21 ` Ondrej Zary [this message]
2006-09-28 12:51   ` [Patch] Memory Leak in sound/isa/es18xx.c Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200609280021.14839.linux@rainbow-software.org \
    --to=linux@rainbow-software.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=snakebyte@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.