From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46663) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKud-0007ss-PW for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNKuX-0003Zh-UK for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35037) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNKuX-0003ZH-N7 for qemu-devel@nongnu.org; Fri, 29 Aug 2014 08:04:09 -0400 From: Gerd Hoffmann Date: Fri, 29 Aug 2014 14:03:42 +0200 Message-Id: <1409313832-2514-8-git-send-email-kraxel@redhat.com> In-Reply-To: <1409313832-2514-1-git-send-email-kraxel@redhat.com> References: <1409313832-2514-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 07/17] usb-ohci: Fix memory leak for ohci timer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gonglei , Gerd Hoffmann From: Gonglei Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- hw/usb/hcd-ohci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 1.8.3.1