diff options
author | Lassi Marttala <Lassi.LM.Marttala@partner.bmw.de> | 2013-01-25 15:02:11 +0100 |
---|---|---|
committer | Alexander Wenzel <Alexander.AW.Wenzel@bmw.de> | 2013-07-19 16:54:23 +0200 |
commit | 43e6aeecf6b35f95bdfe55c3b4d7ef7fc384db30 (patch) | |
tree | 4b04d86359c6a6d98663bfa18205a0fe1304e679 /src | |
parent | 06d85034559e3d7fd7a10e1caaa77fe79bf25a68 (diff) | |
download | DLT-daemon-43e6aeecf6b35f95bdfe55c3b4d7ef7fc384db30.tar.gz |
Close filehandle on early exists
Signed-off-by: Alexander Wenzel <Alexander.AW.Wenzel@bmw.de>
Diffstat (limited to 'src')
-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 9405e6e..ea9e43d 100644 --- a/src/daemon/dlt-daemon.c +++ b/src/daemon/dlt-daemon.c @@ -950,6 +950,7 @@ int dlt_daemon_local_ecu_version_init(DltDaemon *daemon, DltDaemonLocal *daemon_ if(fstat(fd, &s_buf) < 0) { dlt_log(LOG_ERR, "Failed to stat ECU Software version file.\n"); + fclose(f); return -1; } @@ -959,6 +960,7 @@ int dlt_daemon_local_ecu_version_init(DltDaemon *daemon, DltDaemonLocal *daemon_ if(size >= DLT_DAEMON_TEXTBUFSIZE) { dlt_log(LOG_ERR, "Too large file for ECU version.\n"); + fclose(f); return -1; } |