From: Sudarshan Bisht <sudarshan.bisht@nokia.com>
To: ext Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 1/2] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker.
Date: Thu, 05 May 2011 15:01:16 +0300 [thread overview]
Message-ID: <1304596876.2543.171.camel@Sudarshan.research.nokia.com> (raw)
In-Reply-To: <s5h8vumpz49.wl%tiwai@suse.de>
On Wed, 2011-05-04 at 11:57 +0200, ext Takashi Iwai wrote:
> At Wed, 4 May 2011 12:46:01 +0300,
> sudarshan.bisht@nokia.com wrote:
> >
> > From: Sudarshan Bisht <sudarshan.bisht@nokia.com>
> >
> > Coverity Static Analysis helps developers find hard-to-spot,
> > yet potentially crash-causing defects early in the development phase,
> > reducing the cost,time, and risk of software errors.
> >
> > This patch has fixes for 1) a junk assignment and 2) memory freed at wrong location.
> >
> > ---
> > modules/mixer/simple/python.c | 1 +
> > src/control/control_hw.c | 1 +
> > src/mixer/mixer.c | 1 -
> > 3 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/modules/mixer/simple/python.c b/modules/mixer/simple/python.c
> > index c822c52..784d9a0 100644
> > --- a/modules/mixer/simple/python.c
> > +++ b/modules/mixer/simple/python.c
> > @@ -663,6 +663,7 @@ pymixer_attach_hctl(struct pymixer *pymixer, PyObject *args)
> > return NULL;
> > err = snd_mixer_attach_hctl(pymixer->mixer, hctl);
> > if (err < 0) {
> > + snd_hctl_close(hctl);
> > PyErr_Format(PyExc_RuntimeError, "Cannot attach hctl: %s", snd_strerror(err));
> > return NULL;
> > }
>
> This doesn't look good.
> We did close mistakenly in snd_mixer_attach_hctl() in the error case,
> and it's fixed by your patch. But this behavior shouldn't be inherited.
>
Sorry but I did not understand whether you want to have this fix in
patch or not ?
> thanks,
>
> Takashi
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2011-05-05 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-04 9:46 [PATCH 2/2] alsa-lib: fixed coverity reported issues under "RESOURCE_LEAK" checker sudarshan.bisht
2011-05-04 9:46 ` [PATCH 1/2] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker sudarshan.bisht
2011-05-04 9:57 ` Takashi Iwai
2011-05-05 12:01 ` Sudarshan Bisht [this message]
2011-05-04 9:53 ` [PATCH 2/2] alsa-lib: fixed coverity reported issues under "RESOURCE_LEAK" checker Takashi Iwai
2011-05-05 11:59 ` Sudarshan Bisht
-- strict thread matches above, loose matches on Subject: below --
2011-05-05 13:05 sudarshan.bisht
2011-05-05 13:05 ` [PATCH 1/2] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker sudarshan.bisht
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=1304596876.2543.171.camel@Sudarshan.research.nokia.com \
--to=sudarshan.bisht@nokia.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).