]> xenbits.xensource.com Git - qemu-xen.git/commit
net: vmxnet3: avoid memory leakage in activate_device
authorP J P <ppandit@redhat.com>
Tue, 15 Dec 2015 06:57:54 +0000 (12:27 +0530)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 5 Feb 2016 12:03:34 +0000 (12:03 +0000)
commit44c0045b1c17bbf16fd3799b46f1612ce9ddfca2
tree742b5c98873f65c43cc2011dead2b49c041ee0a5
parent31663cad8a9e4070d3f6353501c9ac4473c524c9
net: vmxnet3: avoid memory leakage in activate_device

Vmxnet3 device emulator does not check if the device is active
before activating it, also it did not free the transmit & receive
buffers while deactivating the device, thus resulting in memory
leakage on the host. This patch fixes both these issues to avoid
host memory leakage.

Reported-by: Qinghao Tang <luodalongde@gmail.com>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Cc: qemu-stable@nongnu.org
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/vmxnet3.c