From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49377) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHUT1-0004Hl-Hz for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aHUSz-0000tt-Es for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:23 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aHUSz-0000th-AL for qemu-devel@nongnu.org; Fri, 08 Jan 2016 05:40:21 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id E953BA8C for ; Fri, 8 Jan 2016 10:40:20 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 8 Jan 2016 11:40:13 +0100 Message-Id: <1452249615-8222-6-git-send-email-kraxel@redhat.com> In-Reply-To: <1452249615-8222-1-git-send-email-kraxel@redhat.com> References: <1452249615-8222-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 5/7] 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: Bandan Das , Gerd Hoffmann From: Bandan Das trace_usb_mtp_inotify_event() was being called after the object was being freed. Signed-off-by: Bandan Das Message-id: 1450861787-16213-3-git-send-email-bsd@redhat.com Signed-off-by: Gerd Hoffmann --- 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: -- 1.8.3.1