From: Ilya Maximets Date: Tue, 2 Feb 2016 11:02:16 +0000 (+0300) Subject: netdev-dpdk: Fix leak on netdev_dpdk_vhost_user_construct failure. X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Fovs.git;a=commitdiff_plain;h=1a64eb93c9f1151811b188bc4fe63b72a945e264 netdev-dpdk: Fix leak on netdev_dpdk_vhost_user_construct failure. Memory pool for vhost-user ports always created even if construction fails. And message about successfull socket creation also printed. Signed-off-by: Ilya Maximets Signed-off-by: Ben Pfaff --- diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 1e43daec9..d115de2c7 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -690,10 +690,11 @@ netdev_dpdk_vhost_user_construct(struct netdev *netdev_) netdev->vhost_id); } else { fatal_signal_add_file_to_unlink(netdev->vhost_id); + VLOG_INFO("Socket %s created for vhost-user port %s\n", + netdev->vhost_id, netdev_->name); + err = vhost_construct_helper(netdev_); } - VLOG_INFO("Socket %s created for vhost-user port %s\n", netdev->vhost_id, netdev_->name); - err = vhost_construct_helper(netdev_); ovs_mutex_unlock(&dpdk_mutex); return err; }