vhost: fix guest pages memory leak
authorDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Fri, 26 May 2017 11:59:14 +0000 (13:59 +0200)
committerYuanhan Liu <yliu@fridaylinux.org>
Fri, 16 Jun 2017 12:04:25 +0000 (14:04 +0200)
commit29c7c2fdaa4e88eebee6e3abaa15858d9616b1aa
tree1e8981a319bd4d4df66629022843a0389706398c
parentd1b2842a9dcf1e7957a185be126f4af9885f9cf7
vhost: fix guest pages memory leak

This patch fixes a memory leak.
virtio_net::guest_pages is allocated in vhost_setup_mem_table(),
reallocated in add_one_guest_page(), but never freed.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Cc: stable@dpdk.org
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jens Freimann <jfreiman@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/vhost_user.c