Skip to content

Commit

Permalink
netdev-dpdk: Fix leak on netdev_dpdk_vhost_user_construct failure.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
igsilya authored and blp committed Feb 2, 2016
1 parent e5c0f5a commit 1a64eb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/netdev-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1a64eb9

Please sign in to comment.