vhost: fix use after free
[dpdk.git] / lib / librte_vhost / socket.c
index 66fd335..c7f99b0 100644 (file)
@@ -242,6 +242,7 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket)
                RTE_LOG(ERR, VHOST_CONFIG,
                        "failed to add fd %d into vhost server fdset\n",
                        fd);
+               return;
        }
 
        pthread_mutex_lock(&vsocket->conn_mutex);