diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-01-24 10:21:28 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-24 20:47:47 (GMT) |
commit | c11bf1c8baff170fa478adc04964da519d160e62 (patch) | |
tree | 9d5b41ba4e07cb546097af97d9956b42b4cb91a8 /drivers/net | |
parent | 2bbba277a554431a426e81f37d5c50ab6216c07d (diff) | |
download | linux-fsl-qoriq-c11bf1c8baff170fa478adc04964da519d160e62.tar.xz |
net/hyperv: fix possible memory leak in do_set_multicast()
do_set_multicast() may not free the memory malloc in
netvsc_set_multicast_list().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 462d05f..1a1ca6c 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -68,11 +68,11 @@ static void do_set_multicast(struct work_struct *w) nvdev = hv_get_drvdata(ndevctx->device_ctx); if (nvdev == NULL) - return; + goto out; rdev = nvdev->extension; if (rdev == NULL) - return; + goto out; if (net->flags & IFF_PROMISC) rndis_filter_set_packet_filter(rdev, @@ -83,6 +83,7 @@ static void do_set_multicast(struct work_struct *w) NDIS_PACKET_TYPE_ALL_MULTICAST | NDIS_PACKET_TYPE_DIRECTED); +out: kfree(w); } |