[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fwts-devel
Subject:    ACK: [PATCH] iASL: fix memory leak of LocalityBuffer on error return path
From:       ivanhu <ivan.hu () canonical ! com>
Date:       2019-11-07 7:48:49
Message-ID: 48bc7028-2c34-21dd-6ef9-5c719a6bda48 () canonical ! com
[Download RAW message or body]


On 10/30/19 5:26 PM, Colin King wrote:
> From: Colin Ian King <colin.king@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@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@canonical.com>


-- 
fwts-devel mailing list
fwts-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/fwts-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic