vhost: fix memory leak on realloc failure
authorTiwei Bie <tiwei.bie@intel.com>
Tue, 15 Jan 2019 07:13:23 +0000 (15:13 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Jan 2019 08:47:26 +0000 (09:47 +0100)
commite1c0834f95597b1d5a889532281eb2fde6774ddd
tree964b932e19e90e10451c13f5c56b72090f26a816
parent9303de0c945f5d6f83162824851369b186cb5732
vhost: fix memory leak on realloc failure

When realloc() fails, the original block isn't freed.

Fixes: e246896178e6 ("vhost: get guest/host physical address mappings")
Cc: stable@dpdk.org
Signed-off-by: Tiwei Bie <tiwei.bie@intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
lib/librte_vhost/vhost_user.c