diff options
Diffstat (limited to 'src/system/dlt-system-syslog.c')
-rw-r--r-- | src/system/dlt-system-syslog.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/system/dlt-system-syslog.c b/src/system/dlt-system-syslog.c index b07e6d6..c788d94 100644 --- a/src/system/dlt-system-syslog.c +++ b/src/system/dlt-system-syslog.c @@ -84,6 +84,7 @@ int init_socket(SyslogOptions opts) { DLT_LOG(syslogContext, DLT_LOG_FATAL, DLT_STRING("Unable to bind socket for SYSLOG.")); + close(sock); return -1; } @@ -138,8 +139,12 @@ void syslog_thread(void *v_conf) while(!threads.shutdown) { if(read_socket(sock) < 0) + { + close(sock); return; + } } + close (sock); } void start_syslog(DltSystemConfiguration *conf) |