From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRwln-00043h-Bs for qemu-devel@nongnu.org; Wed, 01 Jun 2011 21:32:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRwll-0005mk-38 for qemu-devel@nongnu.org; Wed, 01 Jun 2011 21:32:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:24014) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRmLc-0000F3-6b for qemu-devel@nongnu.org; Wed, 01 Jun 2011 10:24:36 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p51EOYNU009106 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Jun 2011 10:24:34 -0400 Message-ID: <4DE64BB0.2080807@redhat.com> Date: Wed, 01 Jun 2011 16:24:48 +0200 From: Hans de Goede MIME-Version: 1.0 References: <1306834530-12763-1-git-send-email-hdegoede@redhat.com> <1306834530-12763-2-git-send-email-hdegoede@redhat.com> <4DE61901.4060100@redhat.com> In-Reply-To: <4DE61901.4060100@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 01/14] usb-linux: Set usb_auto_timer to NULL after deleting it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-devel@nongnu.org Hi, On 06/01/2011 12:48 PM, Gerd Hoffmann wrote: > On 05/31/11 11:35, Hans de Goede wrote: >> We might check for it being NULL later, if the device gets unplugged. >> --- >> usb-linux.c | 1 + >> 1 files changed, 1 insertions(+), 0 deletions(-) >> >> diff --git a/usb-linux.c b/usb-linux.c >> index 4d7a31a..ea3ab5f 100644 >> --- a/usb-linux.c >> +++ b/usb-linux.c >> @@ -1675,6 +1675,7 @@ static void usb_host_auto_check(void *unused) >> /* nothing to watch */ >> if (usb_auto_timer) { >> qemu_del_timer(usb_auto_timer); >> + usb_auto_timer = NULL; > > This is wrong. > > qemu_del_timer just removes the scheduled timer event, not the timer structure itself. qemu_free_timer does the later. > Ok, I stand corrected :) Regards, Hans