ACK: [PATCH 3/5] lib: fwts_olog: fix memory leak on buffer on error exit path
Alex Hung
alex.hung at canonical.com
Wed Apr 6 02:43:48 UTC 2016
On 2016-04-03 01:52 AM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> CovertyScan detected a memory leak on buffer, free the buffer on the
> error exit path
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_olog.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/lib/src/fwts_olog.c b/src/lib/src/fwts_olog.c
> index 62526ce..a685d70 100644
> --- a/src/lib/src/fwts_olog.c
> +++ b/src/lib/src/fwts_olog.c
> @@ -94,6 +94,7 @@ fwts_list *fwts_olog_read(fwts_framework *fw)
>
> if (!(msglog_outfile_f = fopen(msglog_outfile, "w"))) {
> /* create the output file for the sysfs msglog */
> + free(buffer);
> goto olog_cleanup_msglog;
> }
>
>
Acked-by: Alex Hung <alex.hung at canonical.com>
More information about the fwts-devel
mailing list