]> git.ipfire.org Git - thirdparty/qemu.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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 15 Mar 2016 17:08:24 +0000 (12:08 -0500)
commit42ae4a3c610e05193a220ab4a6c046decb2866be
treeed5f3a4f41fa4d2aae4f1d2769d272cd3b33cc32
parent0d335804e31b2d93935c957893f4007678390f98
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>
(cherry picked from commit aa4a3dce1c88ed51b616806b8214b7c8428b7470)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/net/vmxnet3.c