From: Adrian Bunk <bunk@stusta.de>
To: wim@iguana.be
Cc: linux-kernel@vger.kernel.org
Subject: [2.6 patch] drivers/char/watchdog/pcwd_usb.c: fix a NULL pointer dereference
Date: Fri, 10 Mar 2006 19:04:38 +0100 [thread overview]
Message-ID: <20060310180438.GQ21864@stusta.de> (raw)
The Coverity checker noted that this resulted in a NULL pointer
reference if we were coming from
if (usb_pcwd == NULL) {
printk(KERN_ERR PFX "Out of memory\n");
goto error;
}
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.16-rc5-mm3-full/drivers/char/watchdog/pcwd_usb.c.old 2006-03-10 18:18:00.000000000 +0100
+++ linux-2.6.16-rc5-mm3-full/drivers/char/watchdog/pcwd_usb.c 2006-03-10 18:18:45.000000000 +0100
@@ -705,7 +705,8 @@ err_out_misc_deregister:
err_out_unregister_reboot:
unregister_reboot_notifier(&usb_pcwd_notifier);
error:
- usb_pcwd_delete (usb_pcwd);
+ if (usb_pcwd)
+ usb_pcwd_delete(usb_pcwd);
usb_pcwd_device = NULL;
return retval;
}
next reply other threads:[~2006-03-10 18:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-10 18:04 Adrian Bunk [this message]
2006-03-12 19:50 ` [2.6 patch] drivers/char/watchdog/pcwd_usb.c: fix a NULL pointer dereference Wim Van Sebroeck
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=20060310180438.GQ21864@stusta.de \
--to=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=wim@iguana.be \
/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