A "return" is missing on error, which could lead to a "use after free"
issue (about var "conn").
Coverity issue: 143476
Fixes:
65388b43f592 ("vhost: fix fd leaks for vhost-user server mode")
Reported-by: John McNamara <john.mcnamara@intel.com>
Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
RTE_LOG(ERR, VHOST_CONFIG,
"failed to add fd %d into vhost server fdset\n",
fd);
+ return;
}
pthread_mutex_lock(&vsocket->conn_mutex);