From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33511) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRiye-0000TQ-2k for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRiyc-0001yd-OE for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:48:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRiyc-0001yP-2g for qemu-devel@nongnu.org; Wed, 01 Jun 2011 06:48:38 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p51Ama2l029045 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Jun 2011 06:48:36 -0400 Message-ID: <4DE61901.4060100@redhat.com> Date: Wed, 01 Jun 2011 12:48:33 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1306834530-12763-1-git-send-email-hdegoede@redhat.com> <1306834530-12763-2-git-send-email-hdegoede@redhat.com> In-Reply-To: <1306834530-12763-2-git-send-email-hdegoede@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: Hans de Goede Cc: qemu-devel@nongnu.org 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. cheers, Gerd