Skip to content

Commit

Permalink
[IRDA] via-ircc: fix memory leak
Browse files Browse the repository at this point in the history
Fix memory leak.

Coverity id# 653

patch location:
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=a1f34cb68b16807ed9d5ebb0f6a6ec5ff8a5fc78

Signed-off-by: Chuck Short <zulcss@gmail.com>
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Chuck Short authored and David S. Miller committed Sep 29, 2006
1 parent 293b9c4 commit 83e331e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/net/irda/via-ircc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1223,8 +1223,13 @@ static int upload_rxdata(struct via_ircc_cb *self, int iobase)

IRDA_DEBUG(2, "%s(): len=%x\n", __FUNCTION__, len);

if ((len - 4) < 2) {
self->stats.rx_dropped++;
return FALSE;
}

skb = dev_alloc_skb(len + 1);
if ((skb == NULL) || ((len - 4) < 2)) {
if (skb == NULL) {
self->stats.rx_dropped++;
return FALSE;
}
Expand Down

0 comments on commit 83e331e

Please sign in to comment.