ACK: [PATCH 2/5] lib: fwts_olog: fix fclose on already closed files.
ivanhu
ivan.hu at canonical.com
Thu Apr 7 07:32:53 UTC 2016
On 2016年04月03日 01:52, Colin King wrote:
> 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;
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list