From: Eric Sesterhenn <snakebyte@gmx.de>
To: linux-sound@vger.kernel.org
Subject: [Patch] Dont call ac97_release_codec with NULL argument in
Date: Sun, 09 Apr 2006 15:09:16 +0000 [thread overview]
Message-ID: <1144595356.18397.3.camel@alice> (raw)
hi,
this is a fix for coverity id #243. We only jump to err_codec
if ac97_alloc_codec() fails its malloc() in which case codec is NULL.
Since ac97_release_codec dereferences its argument we shouldnt call
it with a NULL argument.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
--- linux-2.6.17-rc1/sound/oss/es1371.c.orig 2006-04-09 17:03:22.000000000 +0200
+++ linux-2.6.17-rc1/sound/oss/es1371.c 2006-04-09 17:03:55.000000000 +0200
@@ -3040,8 +3040,8 @@ static int __devinit es1371_probe(struct
err_irq:
release_region(s->io, ES1371_EXTENT);
err_region:
- err_codec:
ac97_release_codec(s->codec);
+ err_codec:
kfree(s);
return res;
}
reply other threads:[~2006-04-09 15:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1144595356.18397.3.camel@alice \
--to=snakebyte@gmx.de \
--cc=linux-sound@vger.kernel.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