Attention is currently required from: Felix Singer, Nico Huber, Tim Wawrzynczak, Paul Menzel, vaibhav.
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/62968 )
Change subject: src/acpi/acpigen_usb.c: Fix False Memory leak error
......................................................................
Patch Set 2:
(1 comment)
File src/acpi/acpigen_usb.c:
https://review.coreboot.org/c/coreboot/+/62968/comment/400603fb_a8dc1e19
PS2, Line 92: #ifdef __clang_analyzer__
: free(fresh);
: #endif
Hmm, right now we do not have any instances of this in the code I can found, other than vendorcode, […]
I think scan-build is just stupid. The `acpi_dp_add_reference()` function stores a copy of the pointer, so it does not leak *here*. Strictly speaking, the memory actually leaks if the pointer doesn't get freed once the acpi_dp_* stuff no longer needs it.
I guess one way to handle this could be to move the `strdup()` call inside the acpi_dp_* functions, and free all the pointers after they're no longer needed.
--
To view, visit
https://review.coreboot.org/c/coreboot/+/62968
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifed611bd0b9c1da3678386bff33bca3eac0311b4
Gerrit-Change-Number: 62968
Gerrit-PatchSet: 2
Gerrit-Owner: vaibhav
vrockz747@gmail.com
Gerrit-Reviewer: Angel Pons
th3fanbus@gmail.com
Gerrit-Reviewer: Felix Singer
felixsinger@posteo.net
Gerrit-Reviewer: Lance Zhao
Gerrit-Reviewer: Nico Huber
nico.h@gmx.de
Gerrit-Reviewer: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Reviewer: build bot (Jenkins)
no-reply@coreboot.org
Gerrit-CC: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: Felix Singer
felixsinger@posteo.net
Gerrit-Attention: Nico Huber
nico.h@gmx.de
Gerrit-Attention: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-Attention: Paul Menzel
paulepanter@mailbox.org
Gerrit-Attention: vaibhav
vrockz747@gmail.com
Gerrit-Comment-Date: Sun, 03 Apr 2022 21:23:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tim Wawrzynczak
twawrzynczak@chromium.org
Gerrit-MessageType: comment