提交 80be63df 编写于 作者: G Gonglei 提交者: Gerd Hoffmann

usb-ohci: Fix memory leak for ohci timer

Signed-off-by: NGonglei <arei.gonglei@huawei.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 e5a9bece
...@@ -1371,8 +1371,10 @@ static int ohci_bus_start(OHCIState *ohci) ...@@ -1371,8 +1371,10 @@ static int ohci_bus_start(OHCIState *ohci)
/* Stop sending SOF tokens on the bus */ /* Stop sending SOF tokens on the bus */
static void ohci_bus_stop(OHCIState *ohci) static void ohci_bus_stop(OHCIState *ohci)
{ {
if (ohci->eof_timer) if (ohci->eof_timer) {
timer_del(ohci->eof_timer); timer_del(ohci->eof_timer);
timer_free(ohci->eof_timer);
}
ohci->eof_timer = NULL; ohci->eof_timer = NULL;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册