Hi Igor,

Thank you for the patch.

On Sun, Jul 12, 2026 at 10:50, Igor Opaniuk <[email protected]> wrote:

> get_partition() returns a malloc()'d struct mmc_part and only frees it on
> its own internal error path. None of its callers - mmc_byte_io(),
> get_unique_guid_for_partition() and get_size_of_partition() - free the
> returned pointer, so every partition access leaks one struct mmc_part.
> A single "avb verify" issues many such accesses (footer, vbmeta and the
> hashed image chunks), so the leak accumulates quickly.
>
> Free the descriptor in all three callers. mmc_byte_io() is reworked to
> use a single exit path so the partition is released on every return.
>
> Fixes: 3af30e4443aa ("avb2.0: implement AVB ops")
> Signed-off-by: Igor Opaniuk <[email protected]>

Reviewed-by: Mattijs Korpershoek <[email protected]>

Reply via email to