UPSTREAM: inteltool: Fix clean-up and close related TODO

We have to call pci_free_dev() for each device we allocated with
pci_get_dev(). Since that's not the case for `sb`, we can close
this TODO.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ic80f45f717536f68774696e0b30cd8d7db9ebc45
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Original-Commit-Id: 0660c6c1ff
Original-Change-Id: I1ef80c837263a205467f835156dcb8fa667d3a8f
Original-Signed-off-by: Nico Huber <nico.huber@secunet.com>
Original-Reviewed-on: https://review.coreboot.org/19587
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/528179
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
This commit is contained in:
Nico Huber 2017-04-05 17:33:46 +02:00 committed by chrome-bot
parent 6f0b68843b
commit b13834def6

View file

@ -568,8 +568,12 @@ int main(int argc, char *argv[])
}
/* Clean up */
if (ahci)
pci_free_dev(ahci);
if (gfx)
pci_free_dev(gfx);
pci_free_dev(nb);
// pci_free_dev(sb); // TODO: glibc detected "double free or corruption"
/* `sb` wasn't allocated by pci_get_dev() */
pci_cleanup(pacc);
return 0;