]> xenbits.xensource.com Git - qemu-upstream-4.4-testing.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 14:53:53 +0000 (14:53 +0000)
commit3f71820abe33f7f32c5983c6b88afc4a992e3c89
treeda5cb1aa46e6d2c0d8436203b3aa7a6b625b88e3
parent3d84bde9aa0d8af7c2b78b5c7737e76ed3f4b177
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