CID 107113 (#1 of 1): Missing unlock (LOCK)5. missing_unlock: Returning
without unlocking pfdset->fd_mutex.
Fixes:
fbf7e07ca142 ("vhost: add select based event driven processing")
Signed-off-by: Huawei Xie <huawei.xie@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
/* Find a free slot in the list. */
i = fdset_find_free_slot(pfdset);
- if (i == -1)
+ if (i == -1) {
+ pthread_mutex_unlock(&pfdset->fd_mutex);
return -2;
+ }
fdset_add_fd(pfdset, i, fd, rcb, wcb, dat);
pfdset->num++;