Skip to content

Commit

Permalink
sis900: Fix mem leak in sis900_rx error path
Browse files Browse the repository at this point in the history
Fix memory leak in error path of sis900_rx(). If we don't do this we'll
leak the skb we dev_alloc_skb()'ed just a few lines above when the
variable goes out of scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jesper Juhl authored and David S. Miller committed Feb 6, 2011
1 parent e45ff01 commit bf1f9ae
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/sis900.c
Original file line number Diff line number Diff line change
Expand Up @@ -1777,6 +1777,7 @@ static int sis900_rx(struct net_device *net_dev)
"cur_rx:%4.4d, dirty_rx:%4.4d\n",
net_dev->name, sis_priv->cur_rx,
sis_priv->dirty_rx);
dev_kfree_skb(skb);
break;
}

Expand Down

0 comments on commit bf1f9ae

Please sign in to comment.