ACK: [PATCH 03/10] pci: crs: fix memory leak on cmdline
IvanHu
ivan.hu at canonical.com
Tue May 6 02:55:01 UTC 2014
On 05/01/2014 10:01 PM, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> Coverity Scan detected a memort leak on cmdline on an error
> exit path. Free the cmdline to stop the leak.
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/pci/crs/crs.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/src/pci/crs/crs.c b/src/pci/crs/crs.c
> index 4396598..d6e29a1 100644
> --- a/src/pci/crs/crs.c
> +++ b/src/pci/crs/crs.c
> @@ -52,11 +52,13 @@ static int crs_test1(fwts_framework *fw)
>
> if (crs_get_bios_date(fw, &day, &mon, &year) != FWTS_OK) {
> fwts_log_error(fw, "Cannot determine age of BIOS.");
> + free(cmdline);
> return FWTS_ERROR;
> }
>
> if ((klog = fwts_klog_read()) == NULL) {
> fwts_log_error(fw, "Cannot read kernel log.");
> + free(cmdline);
> return FWTS_ERROR;
> }
>
>
Acked-by: Ivan Hu <ivan.hu at canonical.com>
More information about the fwts-devel
mailing list