diff options
author | Jesper Juhl <jj@chaosbits.net> | 2011-02-05 11:41:53 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-06 03:08:57 +0100 |
commit | bf1f9ae05036e12035f8e9a48f3dcf4dd14fdada (patch) | |
tree | 2f92d8a00362164dd1669f83a7b5580c022a2b14 /drivers/net | |
parent | benet: Avoid potential null deref in be_cmd_get_seeprom_data() (diff) | |
download | linux-bf1f9ae05036e12035f8e9a48f3dcf4dd14fdada.tar.xz linux-bf1f9ae05036e12035f8e9a48f3dcf4dd14fdada.zip |
sis900: Fix mem leak in sis900_rx error path
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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/sis900.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c index 5976d1d51df1..640e368ebeee 100644 --- a/drivers/net/sis900.c +++ b/drivers/net/sis900.c @@ -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; } |