From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBfRI-0006QM-KS for qemu-devel@nongnu.org; Wed, 23 Dec 2015 04:10:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aBfRH-0005Tw-R7 for qemu-devel@nongnu.org; Wed, 23 Dec 2015 04:10:32 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aBfRH-0005To-M0 for qemu-devel@nongnu.org; Wed, 23 Dec 2015 04:10:31 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 682F8C062C96 for ; Wed, 23 Dec 2015 09:10:31 +0000 (UTC) From: Bandan Das Date: Wed, 23 Dec 2015 14:39:47 +0530 Message-Id: <1450861787-16213-3-git-send-email-bsd@redhat.com> In-Reply-To: <1450861787-16213-1-git-send-email-bsd@redhat.com> References: <1450861787-16213-1-git-send-email-bsd@redhat.com> Subject: [Qemu-devel] [PATCH 2/2] usb-mtp: fix call to trace function List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, Bandan Das , kraxel@redhat.com trace_usb_mtp_inotify_event() was being called after the object was being freed. Signed-off-by: Bandan Das --- hw/usb/dev-mtp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index db1fd59..4177a87 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -502,9 +502,9 @@ static void inotify_watchfn(void *arg) entry = g_new0(MTPMonEntry, 1); entry->handle = o->handle; entry->event = EVT_OBJ_REMOVED; - usb_mtp_object_free(s, o); trace_usb_mtp_inotify_event(s->dev.addr, o->path, event->mask, "Obj Deleted"); + usb_mtp_object_free(s, o); break; case IN_MODIFY: -- 2.6.2