From: Sudarshan Bisht <sudarshan.bisht@nokia.com>
To: ext Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 3/3 v4] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker.
Date: Tue, 05 Apr 2011 10:44:15 +0300 [thread overview]
Message-ID: <1301989455.16314.251.camel@Sudarshan.research.nokia.com> (raw)
In-Reply-To: <s5hoc4mti6a.wl%tiwai@suse.de>
On Mon, 2011-04-04 at 12:38 +0200, ext Takashi Iwai wrote:
> At Mon, 4 Apr 2011 13:04:02 +0300,
> sudarshan.bisht@nokia.com wrote:
> >
> > diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
> > index 9e9aaf5..c722b02 100644
> > --- a/src/mixer/simple_abst.c
> > +++ b/src/mixer/simple_abst.c
> > @@ -336,6 +336,8 @@ int snd_mixer_simple_basic_register(snd_mixer_t *mixer,
> > err = find_module(class, top);
> > if (err >= 0)
> > err = snd_mixer_attach_hctl(mixer, priv->hctl);
> > + if (err < 0)
> > + goto __error;
> > if (err >= 0) {
> > priv->attach_flag = 1;
> > err = snd_mixer_class_register(class, mixer);
>
> You need braces.
> But, actually this check isn't needed. If you follow the code below
> there, it reaches to __error properly when err < 0.
Yes, there is no need of this check.
>
> thanks,
>
> Takashi
Thanks,
Sudarshan
prev parent reply other threads:[~2011-04-05 7:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 10:04 [PATCH 3/3 v4] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker sudarshan.bisht
2011-04-04 10:38 ` Takashi Iwai
2011-04-05 7:44 ` Sudarshan Bisht [this message]
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=1301989455.16314.251.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).