diff options
| author | Igor Opaniuk <[email protected]> | 2026-07-12 10:50:21 +0200 |
|---|---|---|
| committer | Mattijs Korpershoek <[email protected]> | 2026-07-24 14:43:24 +0200 |
| commit | f9c750ea306877432a525de1ebd9740ec815e5da (patch) | |
| tree | 5e75aa05f004b45e41118bc6b54d1141bb923730 /doc/develop/bootstd/overview.rst | |
| parent | a7f65a6b6abc7119394e1ae7f16e3c60d39166c8 (diff) | |
avb: free mmc_part allocated by get_partition()
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]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'doc/develop/bootstd/overview.rst')
0 files changed, 0 insertions, 0 deletions
