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

ivanhu ivan.hu at canonical.com
Thu Nov 7 07:48:49 UTC 2019


On 10/30/19 5:26 PM, 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: Ivan Hu <ivan.hu at canonical.com>




More information about the fwts-devel mailing list