diff options
author | Phong Tran <tranmanphong@gmail.com> | 2019-11-30 18:00:50 +0700 |
---|---|---|
committer | Saya Sugiura <39760799+ssugiura@users.noreply.github.com> | 2019-12-11 08:22:37 +0900 |
commit | 43fb9a4d67957d678bb94e86d893dd9d270f2546 (patch) | |
tree | 426b3e9590cf1bed40941c8628d6dc642970a026 /src/daemon/dlt-daemon.c | |
parent | 4a81f31e6bdfa1ef0f7e910970bd2afc66f46535 (diff) | |
download | DLT-daemon-43fb9a4d67957d678bb94e86d893dd9d270f2546.tar.gz |
dlt-daemon: fix resource leak
return without close the file descriptor.
reported by Resource leak (RESOURCE_LEAK)
Signed-off-by: Phong Tran <tranmanphong@gmail.com>
Diffstat (limited to 'src/daemon/dlt-daemon.c')
-rw-r--r-- | src/daemon/dlt-daemon.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/daemon/dlt-daemon.c b/src/daemon/dlt-daemon.c index 30e5dda..b2d3668 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -650,6 +650,7 @@ int option_file_parser(DltDaemonLocal *daemon_local) if (daemon_local->flags.ipNodes == NULL) { dlt_vlog(LOG_ERR, "Could not allocate for IP list\n"); + fclose(pFile); return -1; } else { @@ -666,6 +667,7 @@ int option_file_parser(DltDaemonLocal *daemon_local) if (newNode == NULL) { dlt_vlog(LOG_ERR, "Could not allocate for IP list\n"); + fclose(pFile); return -1; } else { |