vhost: fix slave request fd leak
authorTiwei Bie <tiwei.bie@intel.com>
Thu, 5 Sep 2019 11:01:25 +0000 (19:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:53 +0000 (15:00 +0200)
commit761d57651c51365354cefb624883fccf62aee67d
tree2fb97c3f0eeb542a77f8ace606bfd0c3d6e255c0
parent039253166a57ee660dd2fbe92ca77fa65154751c
vhost: fix slave request fd leak

We need to close the old slave request fd if any first
before taking the new one.

Fixes: 275c3f944730 ("vhost: support slave requests channel")
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