[PATCH 2/5] lib: fwts_olog: fix fclose on already closed files.
Colin King
colin.king at canonical.com
Sat Apr 2 17:52:01 UTC 2016
From: Colin Ian King <colin.king at canonical.com>
CoverityScan detected file closing on already closed files,
CID 1353734 "Use after free, fclose dereferences freed pointer"
Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
src/lib/src/fwts_olog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
index 46a920c..62526ce 100644
--- a/src/lib/src/fwts_olog.c
+++ b/src/lib/src/fwts_olog.c
@@ -130,7 +130,7 @@ fwts_list *fwts_olog_read(fwts_framework *fw)
* Now work on the dumped out msglog as a real file system file
*/
if (!(msglog_outfile_f = fopen(msglog_outfile, "r")))
- goto olog_cleanup_common;
+ goto olog_common_exit;
if (fseek(msglog_outfile_f,0,SEEK_END))
goto olog_cleanup_msglog_outfile;
--
2.7.4
More information about the fwts-devel
mailing list