diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index 9a1bb842..15ac8630 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -573,20 +573,26 @@ int option_file_parser(DltDaemonLocal *daemon_local) else if (strcmp(token, "RingbufferMinSize") == 0) { if (dlt_daemon_check_numeric_setting(token, - value, &(daemon_local->RingbufferMinSize)) < 0) + value, &(daemon_local->RingbufferMinSize)) < 0) { + fclose (pFile); return -1; + } } else if (strcmp(token, "RingbufferMaxSize") == 0) { if (dlt_daemon_check_numeric_setting(token, - value, &(daemon_local->RingbufferMaxSize)) < 0) + value, &(daemon_local->RingbufferMaxSize)) < 0) { + fclose (pFile); return -1; + } } else if (strcmp(token, "RingbufferStepSize") == 0) { if (dlt_daemon_check_numeric_setting(token, - value, &(daemon_local->RingbufferStepSize)) < 0) + value, &(daemon_local->RingbufferStepSize)) < 0) { + fclose (pFile); return -1; + } } else if (strcmp(token, "SharedMemorySize") == 0) { @@ -755,8 +761,10 @@ int option_file_parser(DltDaemonLocal *daemon_local) else if (strcmp(token, "DaemonFIFOSize") == 0) { if (dlt_daemon_check_numeric_setting(token, - value, &(daemon_local->daemonFifoSize)) < 0) + value, &(daemon_local->daemonFifoSize)) < 0) { + fclose (pFile); return -1; + } #ifndef __linux__ printf("Option DaemonFIFOSize is set but only supported on Linux. Ignored.\n"); #endif