[coreboot-gerrit] New patch to review for coreboot: libpayload: xhci: plug leak

Patrick Georgi (pgeorgi@google.com) gerrit at coreboot.org
Wed Jan 4 22:10:44 CET 2017


Patrick Georgi (pgeorgi at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18035

-gerrit

commit 9749efadcac07afe6dbc34d8680ffa542afe779f
Author: Patrick Georgi <pgeorgi at chromium.org>
Date:   Wed Jan 4 22:08:10 2017 +0100

    libpayload: xhci: plug leak
    
    Change-Id: Ia163872846906c6c78144a984a405812f856f626
    Signed-off-by: Patrick Georgi <pgeorgi at chromium.org>
    Found-by: Coverity Scan #1325835
---
 payloads/libpayload/drivers/usb/xhci_devconf.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/payloads/libpayload/drivers/usb/xhci_devconf.c b/payloads/libpayload/drivers/usb/xhci_devconf.c
index 48d928c..b697b0f 100644
--- a/payloads/libpayload/drivers/usb/xhci_devconf.c
+++ b/payloads/libpayload/drivers/usb/xhci_devconf.c
@@ -451,6 +451,7 @@ xhci_destroy_dev(hci_t *const controller, const int slot_id)
 	*ic->drop = (1 << num_eps) - 1;	/* Drop all endpoints we can. */
 	*ic->drop &= ~(1 << 1 | 1 << 0); /* Not allowed to drop EP0 or Slot. */
 	int cc = xhci_cmd_evaluate_context(xhci, slot_id, ic);
+	free(ic);
 	if (cc != CC_SUCCESS)
 		xhci_debug("Failed to quiesce slot %d: %d\n", slot_id, cc);
 	cc = xhci_cmd_stop_endpoint(xhci, slot_id, 1);



More information about the coreboot-gerrit mailing list