Attention is currently required from: Nico Huber, Arthur Heymans, Anastasia Klimchuk.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/54905 )
Change subject: dummyflasher.c: Don't leak `emu_persistent_image`
......................................................................
Patch Set 1:
(1 comment)
File dummyflasher.c:
https://review.coreboot.org/c/flashrom/+/54905/comment/564cc727_142daf52
PS1, Line 1026: free(data->emu_persistent_image);
Is it ok to free something which is !(not) ?
Do you mean if it's okay to pass a null pointer to `free()`? Quoting the C standard, 7.20.3.2/2 from ISO-IEC 9899 [1]:
If ptr is a null pointer, no action occurs.
So yes, it's a perfectly fine thing to do.
[1]: http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf
--
To view, visit
https://review.coreboot.org/c/flashrom/+/54905
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I76529973cefcc6a1472681e1f4da8239fcbf07a6
Gerrit-Change-Number: 54905
Gerrit-PatchSet: 1
Gerrit-Owner: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Anastasia Klimchuk
aklm@chromium.org
Gerrit-Reviewer: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Reviewer: Edward O'Callaghan
quasisec@chromium.org
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Arthur Heymans
arthur@aheymans.xyz
Gerrit-Attention: Anastasia Klimchuk
aklm@chromium.org
Gerrit-Comment-Date: Wed, 26 May 2021 10:00:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Edward O'Callaghan
quasisec@chromium.org
Comment-In-Reply-To: Anastasia Klimchuk
aklm@chromium.org
Gerrit-MessageType: comment