/* SPDX-License-Identifier: BSD-3-Clause
* Copyright 2016 6WIND S.A.
+ * Copyright 2016 Mellanox Technologies, Ltd
*/
#define _GNU_SOURCE
int ret;
int flags;
+ /*
+ * Close the last socket that was used to communicate
+ * with the secondary process
+ */
+ if (priv->primary_socket)
+ mlx5_socket_uninit(dev);
/*
* Initialise the socket to communicate with the secondary
* process.
}
ret = *fd;
close(socket_fd);
- return 0;
+ return ret;
error:
if (socket_fd != -1)
close(socket_fd);