libpayload: xhci: plug leak

Change-Id: Ia163872846906c6c78144a984a405812f856f626
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Found-by: Coverity Scan #1325835
Reviewed-on: https://review.coreboot.org/18035
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
This commit is contained in:
Patrick Georgi 2017-01-04 22:08:10 +01:00 committed by Martin Roth
parent 61dac130b2
commit a370ae8556
1 changed files with 1 additions and 0 deletions

View File

@ -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 << num_eps) - 1; /* Drop all endpoints we can. */
*ic->drop &= ~(1 << 1 | 1 << 0); /* Not allowed to drop EP0 or Slot. */ *ic->drop &= ~(1 << 1 | 1 << 0); /* Not allowed to drop EP0 or Slot. */
int cc = xhci_cmd_evaluate_context(xhci, slot_id, ic); int cc = xhci_cmd_evaluate_context(xhci, slot_id, ic);
free(ic);
if (cc != CC_SUCCESS) if (cc != CC_SUCCESS)
xhci_debug("Failed to quiesce slot %d: %d\n", slot_id, cc); xhci_debug("Failed to quiesce slot %d: %d\n", slot_id, cc);
cc = xhci_cmd_stop_endpoint(xhci, slot_id, 1); cc = xhci_cmd_stop_endpoint(xhci, slot_id, 1);