1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-11-14 03:30:41 +01:00
Files
flashrom/flashrom.c
Michał Iwanicki cb19a53db0 flashrom.c: use finalize_flash_access in case of failure
`unlock_flash_wp` which is called in `prepare_flash_access` registers
chip restore via `register_chip_restore`. Function failing after
this moment would result in memory leak.

Fix this issue by calling `finalize_flash_access` even if this function
fails.

Change-Id: I2e7be3f4f71447a1df532f02d1e45d20c253da5a
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/89684
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
2025-11-10 11:03:27 +00:00

68 KiB