diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/artnet.c | 1 | ||||
-rw-r--r-- | backends/sacn.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/backends/artnet.c b/backends/artnet.c index f98ae96..d9ebfe5 100644 --- a/backends/artnet.c +++ b/backends/artnet.c @@ -77,6 +77,7 @@ static int artnet_listener(char* host, char* port){ flags = fcntl(fd, F_GETFL, 0); if(fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0){ fprintf(stderr, "Failed to set ArtNet descriptor nonblocking\n"); + close(fd); return -1; } diff --git a/backends/sacn.c b/backends/sacn.c index 57ac789..7fc7a59 100644 --- a/backends/sacn.c +++ b/backends/sacn.c @@ -111,6 +111,7 @@ static int sacn_listener(char* host, char* port, uint8_t fd_flags){ flags = fcntl(fd, F_GETFL, 0); if(fcntl(fd, F_SETFL, flags | O_NONBLOCK) < 0){ fprintf(stderr, "Failed to set sACN descriptor nonblocking\n"); + close(fd); return -1; } @@ -641,6 +642,7 @@ static int sacn_start(){ if(!global_cfg.fds){ fprintf(stderr, "Failed to start sACN backend: no descriptors bound\n"); + free(inst); return 1; } |