]> xenbits.xensource.com Git - qemu-upstream-4.6-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 12:43:51 +0000 (12:43 +0000)
commit71aec1d33150ecfe046b782e4865e468b83f97cd
treea6406f3370390fe5537d9ae57097f5635704d22d
parentb3286c9f3861eb2504f8bf461a721cfd22619a0c
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