Attention is currently required from: Thomas Heijligen, Anastasia Klimchuk, Nikolai Artemiev. Joursoir has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/64351 )
Change subject: cli_classic: fix memory leak ......................................................................
Patch Set 1:
(3 comments)
Patchset:
PS1:
Joursoir, so glad to see you here, thanks for the patch!
I'm happy to help!
PS1:
This memory leak was introduced with CB:58738 cli_classic. […]
Should I add this to the commit message, or is it just the message to anyone?
File cli_classic.c:
https://review.coreboot.org/c/flashrom/+/64351/comment/7322ecb7_e6623264 PS1, Line 1103: if (set_wp_region && wp_region)
I am wondering whether this condition needed. Maybe we can just have one line […]
Theoretically, yes. If pointer is a null-pointer, no action would occur. But I'm not sure if this behavior is part of C standard.
It makes no sense to check if set_wp_region is set, so at least I'll change it to
``` if (wp_region) free(wp_region); ```