aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--backends/artnet.c1
-rw-r--r--backends/sacn.c2
-rw-r--r--plugin.c1
3 files changed, 4 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;
}
diff --git a/plugin.c b/plugin.c
index 7b5e922..48db410 100644
--- a/plugin.c
+++ b/plugin.c
@@ -40,6 +40,7 @@ static int plugin_attach(char* path, char* file){
}
}
else{
+ dlclose(handle);
free(lib);
return 0;
}