From: Jesper Juhl <jesper.juhl@gmail.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Hannu Savolainen <hannu@opensound.com>
Subject: [PATCH][OSS] Don't check pointers about to be vfree()'d for NULL
Date: Sat, 4 Feb 2006 20:55:48 +0100 [thread overview]
Message-ID: <200602042055.49024.jesper.juhl@gmail.com> (raw)
There's no need to check pointers for NULL before handing them to vfree().
Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
---
sound/oss/sequencer.c | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
--- linux-2.6.16-rc2-git1-orig/sound/oss/sequencer.c 2006-01-03 04:21:10.000000000 +0100
+++ linux-2.6.16-rc2-git1/sound/oss/sequencer.c 2006-02-04 20:51:49.000000000 +0100
@@ -1671,14 +1671,7 @@
void sequencer_unload(void)
{
- if(queue)
- {
- vfree(queue);
- queue=NULL;
- }
- if(iqueue)
- {
- vfree(iqueue);
- iqueue=NULL;
- }
+ vfree(queue);
+ vfree(iqueue);
+ queue = iqueue = NULL;
}
reply other threads:[~2006-02-04 19:55 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=200602042055.49024.jesper.juhl@gmail.com \
--to=jesper.juhl@gmail.com \
--cc=hannu@opensound.com \
--cc=linux-kernel@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
Powered by JetHome