From: Adrian Bunk <bunk@stusta.de>
To: kkeil@suse.de, kai.germaschewski@gmx.de
Cc: isdn4linux@listserv.isdn4linux.de, linux-kernel@vger.kernel.org
Subject: [2.6 patch] i4l/isdn_tty.c: fix a check-after-use
Date: Wed, 15 Mar 2006 17:31:33 +0100 [thread overview]
Message-ID: <20060315163133.GX13973@stusta.de> (raw)
This patch fixes a check-after-use spotted by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
--- linux-2.6.16-rc6-mm1-full/drivers/isdn/i4l/isdn_tty.c.old 2006-03-14 02:41:38.000000000 +0100
+++ linux-2.6.16-rc6-mm1-full/drivers/isdn/i4l/isdn_tty.c 2006-03-14 02:42:10.000000000 +0100
@@ -2345,12 +2345,15 @@ isdn_tty_at_cout(char *msg, modem_info *
u_long flags;
struct sk_buff *skb = NULL;
char *sp = NULL;
- int l = strlen(msg);
+ int l;
if (!msg) {
printk(KERN_WARNING "isdn_tty: Null-Message in isdn_tty_at_cout\n");
return;
}
+
+ l = strlen(msg);
+
spin_lock_irqsave(&info->readlock, flags);
tty = info->tty;
if ((info->flags & ISDN_ASYNC_CLOSING) || (!tty)) {
reply other threads:[~2006-03-15 16:31 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=20060315163133.GX13973@stusta.de \
--to=bunk@stusta.de \
--cc=isdn4linux@listserv.isdn4linux.de \
--cc=kai.germaschewski@gmx.de \
--cc=kkeil@suse.de \
--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