diff options
author | Sander Vrijders <[email protected]> | 2016-05-22 10:31:08 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2016-05-22 10:31:08 +0200 |
commit | 5da36185bde40772eb46592fcda9a4636f1c5cd4 (patch) | |
tree | fd83242e72c0a8c2d33e0eec4aef344ff6b2f2c7 /src/lib/sockets.c | |
parent | d53fd8ef0228f287568cc51b87733780591308fc (diff) | |
parent | a81e1dfb377ef3e53c2a158ea438f27773ceb25d (diff) | |
download | ouroboros-5da36185bde40772eb46592fcda9a4636f1c5cd4.tar.gz ouroboros-5da36185bde40772eb46592fcda9a4636f1c5cd4.zip |
Merged in dstaesse/ouroboros/be-dealloc (pull request #103)
lib, irmd, ipcpd: Flow deallocation over shim UDP
Diffstat (limited to 'src/lib/sockets.c')
-rw-r--r-- | src/lib/sockets.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/sockets.c b/src/lib/sockets.c index 4f777805..6c51e916 100644 --- a/src/lib/sockets.c +++ b/src/lib/sockets.c @@ -50,6 +50,7 @@ int client_socket_open(char * file_name) (struct sockaddr *) &serv_addr, sizeof(serv_addr))) { LOG_ERR("Failed to connect to daemon"); + close(sockfd); return -1; } @@ -83,11 +84,13 @@ int server_socket_open(char * file_name) (struct sockaddr *) &serv_addr, sizeof(serv_addr))) { LOG_ERR("Failed to bind socket"); + close(sockfd); return -1; } if (listen(sockfd, 0)) { LOG_ERR("Failed to listen to socket"); + close(sockfd); return -1; } |