ACK: [PATCH] iASL: fix memory leak of LocalityBuffer on error return path

Alex Hung alex.hung at canonical.com
Thu Oct 31 04:55:53 UTC 2019


On 2019-10-30 3:26 a.m., Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
> 
> The error return path is not free'ing previously allocated
> resource LocalityBuffer and hence there is a memory leak. Fix this
> by free'ing it before returning.
> 
> Fixes: c22c0b1df98c ("Data table compiler: Add error messages for SLIT locality buffers")
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
>  src/acpica/source/compiler/dttable2.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/acpica/source/compiler/dttable2.c b/src/acpica/source/compiler/dttable2.c
> index bbaaafaa..550cca13 100644
> --- a/src/acpica/source/compiler/dttable2.c
> +++ b/src/acpica/source/compiler/dttable2.c
> @@ -1662,6 +1662,7 @@ DtCompileSlit (
>              "Found %u entries, must match LocalityCount: %u",
>              LocalityListLength, Localities);
>          DtError (ASL_ERROR, ASL_MSG_ENTRY_LIST, EndOfFieldList, AslGbl_MsgBuffer);
> +        ACPI_FREE (LocalityBuffer);
>          return (AE_LIMIT);
>      }
>  
> 

Acked-by: Alex Hung <alex.hung at canonical.com>




More information about the fwts-devel mailing list