Closing the fd_server file descriptor on error to fix the resource leak.
Coverity issue: 272587
Fixes:
4bbf8e30aa5e ("examples/ip_pipeline: add CLI interface")
Signed-off-by: Kevin Laatz <kevin.laatz@intel.com>
Reviewed-by: Jasvinder Singh <jasvinder.singh@intel.com>
sizeof(server_address));
if (status == -1) {
conn_free(conn);
+ close(fd_server);
return NULL;
}
status = listen(fd_server, 16);
if (status == -1) {
conn_free(conn);
+ close(fd_server);
return NULL;
}
fd_client_group = epoll_create(1);
if (fd_client_group == -1) {
conn_free(conn);
+ close(fd_server);
return NULL;
}