usb-mtp: use safe variant when cleaning events list
commitc22d5dcd7a8ee8316dfbad66d13abb6d661c86b9
authorBandan Das <bsd@redhat.com>
Wed, 23 Dec 2015 09:09:46 +0000 (23 14:39 +0530)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 8 Jan 2016 08:25:50 +0000 (8 09:25 +0100)
tree742c95fbd48dbdc7fcd304a55ef9535461528dae
parent0922c3f6064ebe4c65fd1190b014a742083b5906
usb-mtp: use safe variant when cleaning events list

usb_mtp_inotify_cleanup uses QLIST_FOREACH to pick events
from a list and free them which is incorrect. Use QLIST_FOREACH_SAFE
instead.

Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 1450861787-16213-2-git-send-email-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/usb/dev-mtp.c