vhost: check return of mutex initialization
authorJens Freimann <jfreimann@redhat.com>
Tue, 4 Jul 2017 08:50:43 +0000 (10:50 +0200)
committerYuanhan Liu <yliu@fridaylinux.org>
Tue, 4 Jul 2017 09:30:54 +0000 (11:30 +0200)
commit2dfeebe26546491300356912358dd242a7b598bf
tree38f2503def2368984f604f3b72eec5249ee08cc4
parentd6983a70e2591f1081f50949739851d8906cef96
vhost: check return of mutex initialization

Check return value of pthread_mutex_init(). Also destroy
mutex in case of other erros before returning.

Signed-off-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
lib/librte_vhost/socket.c