vhost: check file descriptor before closing
authorHuawei Xie <huawei.xie@intel.com>
Fri, 6 Mar 2015 11:05:43 +0000 (19:05 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 9 Mar 2015 11:46:46 +0000 (12:46 +0100)
commit4d16fff49628b3f62a3d709ac75d15a326cfd4ff
treea556aee12993b64be19fd30572d5ff43f1ddde61
parent64ab9717914f22e8b7a4842fb997c9587acd5191
vhost: check file descriptor before closing

This avoids closing -1 in our case.

Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: Changchun Ouyang <changchun.ouyang@intel.com>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
lib/librte_vhost/virtio-net.c