summaryrefslogtreecommitdiff
path: root/hw/usb/dev-mtp.c
diff options
context:
space:
mode:
authorBandan Das <bsd@redhat.com>2015-12-23 14:39:47 +0530
committerGerd Hoffmann <kraxel@redhat.com>2016-01-08 09:25:50 +0100
commitec93e158b1930d6c6db22e3c0a655337ae221034 (patch)
tree2b23875165eee082481f1a7aaf701684f954f95e /hw/usb/dev-mtp.c
parentc22d5dcd7a8ee8316dfbad66d13abb6d661c86b9 (diff)
downloadqemu-ec93e158b1930d6c6db22e3c0a655337ae221034.tar.gz
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 <bsd@redhat.com> Message-id: 1450861787-16213-3-git-send-email-bsd@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/usb/dev-mtp.c')
-rw-r--r--hw/usb/dev-mtp.c2
1 files changed, 1 insertions, 1 deletions
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: