diff options
author | Bandan Das <bsd@redhat.com> | 2018-02-23 11:48:26 -0500 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-02-26 12:18:36 +0100 |
commit | 5d13ebeacc22eb854e5d70b18fda1af22a46dc27 (patch) | |
tree | 6aa0e24e2f85ce855556f66e02e1940eb64fb7fc /hw | |
parent | 9c72758439c44f48f095d9d85e5e20d8050ab93a (diff) | |
download | qemu-5d13ebeacc22eb854e5d70b18fda1af22a46dc27.zip qemu-5d13ebeacc22eb854e5d70b18fda1af22a46dc27.tar.gz qemu-5d13ebeacc22eb854e5d70b18fda1af22a46dc27.tar.bz2 |
usb-mtp: print parent path in IN_IGNORED trace fn
Fix a possible null dereference when deleting a folder and
its contents. An ignored event might be received for its contents
after the parent folder is deleted which will return a null object.
Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 20180223164829.29683-3-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/dev-mtp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b55aa82..63f8f3b 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -540,9 +540,8 @@ static void inotify_watchfn(void *arg) break; case IN_IGNORED: - o = usb_mtp_object_lookup_name(parent, event->name, event->len); - trace_usb_mtp_inotify_event(s->dev.addr, o->path, - event->mask, "Obj ignored"); + trace_usb_mtp_inotify_event(s->dev.addr, parent->path, + event->mask, "Obj parent dir ignored"); break; default: |