Attention is currently required from: Nico Huber, Edward O'Callaghan. Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/52557 )
Change subject: dummyflasher.c: Fix memory leak on shutdown ......................................................................
Patch Set 1:
(3 comments)
File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/52557/comment/b2790067_ae6a8915 PS1, Line 716: return 1;
Doesn't `data` leak here as well? And also in the other return paths.
Yes it does. I think dummy needs refactoring of init, to allocate data at the very end of init (instead of the very beginning) and also to make sure all init failure paths do cleanup. I am doing this gradually for the tree, it's just dummy's turn hasn't come yet!
https://review.coreboot.org/c/flashrom/+/52557/comment/eecb8945_70377042 PS1, Line 982: free(status);
For another patch: this is the same story as CB:46551
Thanks for the link, I will definitely look at this.
https://review.coreboot.org/c/flashrom/+/52557/comment/c0321413_ec6c46dd PS1, Line 986: return 1;
`flashchip_contents` also leaks here. We could also move this check to run before the malloc() call. […]
Yes, malloc should be at the end I think. I would [ideally] submit this one first, if possible, so that I won't need to merge with myself.