Attention is currently required from: David Hendricks, Angel Pons, Anastasia Klimchuk.
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/70006 )
Change subject: layout: Check return values for strdup in register_include_arg ......................................................................
Patch Set 5:
(3 comments)
Commit Message:
https://review.coreboot.org/c/flashrom/+/70006/comment/f36b5b30_3c2d576b PS5, Line 9: strdup return values should be checked for NULL to catch the : potential error case of out of memory. This patch does more than this. It refactors, if you are going to do this I suggest splitting the patch into perhaps two patches.
The first should factor out all this C-typical string parsing hand grenade type stuff into its own static function.
The second patch can refactor the inadequate error handling of ternary operators acting on heap allocating functions. Also if you are going to unroll the ternary operators, do all of them to make the function procedurally obvious.
File layout.c:
https://review.coreboot.org/c/flashrom/+/70006/comment/40111dcb_a81f9fde PS5, Line 136: Could not allocate memory CB:69472
https://review.coreboot.org/c/flashrom/+/70006/comment/e65aa596_442440a1 PS5, Line 149: Could not allocate memory\ CB:69472