]> xenbits.xensource.com Git - qemu-upstream-4.5-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:55:01 +0000 (14:55 +0000)
commitb993d1eba4c5ef89ba5bdbcaac63f4d668bdc8c6
tree6143dfd9c9b1df6249c31b0a0b87a2fc46758a09
parentca4b8af6798b1e21c3ef4dfa8df7fbb133f55396
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