]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
sis900: Fix mem leak in sis900_rx error path
authorJesper Juhl <jj@chaosbits.net>
Sat, 5 Feb 2011 10:41:53 +0000 (10:41 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 6 Feb 2011 02:08:57 +0000 (18:08 -0800)
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>
drivers/net/sis900.c

index 5976d1d51df1d83e48690cb23b245999f8229a2f..640e368ebeee9f60f7543e9290f2130ad1f21c41 100644 (file)
@@ -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;
                        }