diff options
author | Gonglei <arei.gonglei@huawei.com> | 2014-06-04 16:31:47 +0800 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-08-29 12:51:44 +0200 |
commit | 80be63df5a19816629343f704345b71e83e6d960 (patch) | |
tree | 83cf0dbab5e856c5ddf727717570d4f31493143f /hw | |
parent | e5a9bece9b5064d0cb0fda68ff68b9361085f400 (diff) | |
download | hqemu-80be63df5a19816629343f704345b71e83e6d960.zip hqemu-80be63df5a19816629343f704345b71e83e6d960.tar.gz |
usb-ohci: Fix memory leak for ohci timer
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/hcd-ohci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index cacf7b0..5505f0a 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -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; } |