From ec93e158b1930d6c6db22e3c0a655337ae221034 Mon Sep 17 00:00:00 2001 From: Bandan Das Date: Wed, 23 Dec 2015 14:39:47 +0530 Subject: [PATCH] usb-mtp: fix call to trace function 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 db1fd59ccf..4177a87ea2 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: