vhost: fix fd leak in dirty logging setup
authorMaxime Coquelin <maxime.coquelin@redhat.com>
Thu, 12 Nov 2020 17:10:28 +0000 (18:10 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:26 +0000 (19:43 +0100)
commit6dc3f119ce7310e4e473e5759885ac773dbb12ef
treeef225aca81095f76e0589824c4626d1d0852900f
parent726a14eb83a594011aba5e09159b47f12bc1bad0
vhost: fix fd leak in dirty logging setup

This patch fixes a file descriptor leak which happens
in the error path of vhost_user_set_log_base().

Fixes: 4796ad63ba1f ("examples/vhost: import userspace vhost application")
Cc: stable@dpdk.org
Reported-by: Xuan Ding <xuan.ding@intel.com>
Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Reviewed-by: Chenbo Xia <chenbo.xia@intel.com>
Reviewed-by: Xueming Li <xuemingl@nvidia.com>
lib/librte_vhost/vhost_user.c