From: Paul Menzel <paulepanter@users.sourceforge.net>
To: alsa-devel@alsa-project.org
Subject: Re: [PATCH 4/4 v2] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker.
Date: Mon, 04 Apr 2011 10:05:48 +0200 [thread overview]
Message-ID: <1301904348.3970.14.camel@mattotaupa> (raw)
In-Reply-To: <1301902076-32126-4-git-send-email-sudarshan.bisht@nokia.com>
[-- Attachment #1.1: Type: text/plain, Size: 2586 bytes --]
Am Montag, den 04.04.2011, 10:27 +0300 schrieb sudarshan.bisht@nokia.com:
> From: Sudarshan <sudarshan.bisht@nokia.com>
Please use your first name and name. You can set that up using the
following command.
git config user.name "Sudarshan Bisht" # If the order is
correct.
> ---
> modules/mixer/simple/python.c | 1 +
> src/control/control_hw.c | 1 +
> src/mixer/mixer.c | 1 -
> src/mixer/simple_abst.c | 2 ++
> 4 files changed, 4 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;
> }
> diff --git a/src/control/control_hw.c b/src/control/control_hw.c
> index cf258b4..16c4987 100644
> --- a/src/control/control_hw.c
> +++ b/src/control/control_hw.c
> @@ -414,6 +414,7 @@ int snd_ctl_hw_open(snd_ctl_t **handle, const char *name, int card, int mode)
> if (err < 0) {
> close(fd);
> free(hw);
> + return err;
> }
> ctl->ops = &snd_ctl_hw_ops;
> ctl->private_data = hw;
> diff --git a/src/mixer/mixer.c b/src/mixer/mixer.c
> index 85d843f..5e5789a 100644
> --- a/src/mixer/mixer.c
> +++ b/src/mixer/mixer.c
> @@ -228,7 +228,6 @@ int snd_mixer_attach_hctl(snd_mixer_t *mixer, snd_hctl_t *hctl)
> return -ENOMEM;
> err = snd_hctl_nonblock(hctl, 1);
> if (err < 0) {
> - snd_hctl_close(hctl);
> free(slave);
> return err;
> }
> diff --git a/src/mixer/simple_abst.c b/src/mixer/simple_abst.c
> index 9e9aaf5..127d8d2 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)
Missing space after `if` and trailing space at the end. You can use `git
diff --check` for that.
> + goto __error;
> if (err >= 0) {
> priv->attach_flag = 1;
> err = snd_mixer_class_register(class, mixer);
Additionally I would use a different commit summary what is done and
write what you have now there into the commit message.
Thanks,
Paul
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
prev parent reply other threads:[~2011-04-04 8:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-04 7:27 [PATCH 1/4 v2] alsa-lib: fixed coverity reported issues under "FORWARD_NULL" checker sudarshan.bisht
2011-04-04 7:27 ` [PATCH 2/4 v2] alsa-lib: fixed coverity reported issues under "RESOURCE_LEAK" checker sudarshan.bisht
2011-04-04 7:27 ` [PATCH 3/4 v2] alsa-lib: fixed coverity reported issues under "REVERSE_INULL" checker sudarshan.bisht
2011-04-04 7:27 ` [PATCH 4/4 v2] alsa-lib: fixed coverity reported issues under "USE_AFTER_FREE" checker sudarshan.bisht
2011-04-04 8:05 ` Paul Menzel [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=1301904348.3970.14.camel@mattotaupa \
--to=paulepanter@users.sourceforge.net \
--cc=alsa-devel@alsa-project.org \
/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).