From: Florin Malita <fmalita@gmail.com>
To: samuel@sortiz.org
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] irda: missing allocation result check in irlap_change_speed()
Date: Wed, 24 May 2006 20:13:26 -0400 [thread overview]
Message-ID: <4474F6A6.1000006@gmail.com> (raw)
The skb allocation may fail, which can result in a NULL pointer
dereference in irlap_queue_xmit().
Coverity CID: 434.
Signed-off-by: Florin Malita <fmalita@gmail.com>
---
diff --git a/net/irda/irlap.c b/net/irda/irlap.c
index 7029618..a165286 100644
--- a/net/irda/irlap.c
+++ b/net/irda/irlap.c
@@ -884,7 +884,8 @@ static void irlap_change_speed(struct ir
if (now) {
/* Send down empty frame to trigger speed change */
skb = dev_alloc_skb(0);
- irlap_queue_xmit(self, skb);
+ if (skb)
+ irlap_queue_xmit(self, skb);
}
}
next reply other threads:[~2006-05-25 0:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-25 0:13 Florin Malita [this message]
2006-05-25 23:22 ` [PATCH] irda: missing allocation result check in irlap_change_speed() David Miller
2006-05-26 0:15 ` Florin Malita
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=4474F6A6.1000006@gmail.com \
--to=fmalita@gmail.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=samuel@sortiz.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.