[ovs-dev] [PATCH 2/2] netdev-dpdk: Fix leak on netdev_dpdk_vhost_user_construct failure.
Ilya Maximets
i.maximets at samsung.com
Tue Feb 2 11:02:16 UTC 2016
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 <i.maximets at samsung.com>
---
lib/netdev-dpdk.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c
index 1e43dae..d115de2 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;
}
--
2.5.0
More information about the dev
mailing list