Attention is currently required from: Edward O'Callaghan, Sergii Dmytruk.
Nikolai Artemiev has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/69517 )
Change subject: flashrom.c: Supplement `chip->unlock()` calls with wp unlocking ......................................................................
Patch Set 14:
(1 comment)
File flashrom.c:
https://review.coreboot.org/c/flashrom/+/69517/comment/c9661551_f2c5e6ab PS13, Line 1931: restore_flash_wp(flash, initial_wp_cfg);
Indirectly calling `flashrom_wp_write_cfg` is intentional here? I guess it won't hurt, just looks w […]
Good point, I hadn't looked at this CL in a while and I thought we needed to restore in this case since the restore function won't be called if registration fails.
But this all happens before we disable flash protection in `unlock_flash_wp()` so we just need to free the reference to `initial_wp_cfg` like you said in your first comment.