Skip to content

Commit

Permalink
usb-ohci: Fix memory leak for ohci timer
Browse files Browse the repository at this point in the history
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
  • Loading branch information
gongleiarei authored and kraxel committed Aug 29, 2014
1 parent e5a9bec commit 80be63d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hw/usb/hcd-ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,10 @@ static int ohci_bus_start(OHCIState *ohci)
/* Stop sending SOF tokens on the bus */
static void ohci_bus_stop(OHCIState *ohci)
{
if (ohci->eof_timer)
if (ohci->eof_timer) {
timer_del(ohci->eof_timer);
timer_free(ohci->eof_timer);
}
ohci->eof_timer = NULL;
}

Expand Down

0 comments on commit 80be63d

Please sign in to comment.