diff options
author | Bandan Das <bsd@redhat.com> | 2015-11-23 16:37:03 -0500 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-12-15 09:25:27 +0100 |
commit | b3c4d4250f571c2c739699be563f764eae1e6f52 (patch) | |
tree | 495cb3f7c0f36217c78251353583e11be4ed5c7d /hw | |
parent | 4c7a67f5cdc79ed3f91a15e869c8dd653efa19b4 (diff) |
usb-mtp: free objects on a mtp reset
On a reset, call usb_mtp_object_free on all objects and their children
Signed-off-by: Bandan Das <bsd@redhat.com>
Message-id: 1448314625-3855-3-git-send-email-bsd@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/usb/dev-mtp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 10b657dabb..5b71691753 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c @@ -908,6 +908,7 @@ static void usb_mtp_handle_reset(USBDevice *dev) trace_usb_mtp_reset(s->dev.addr); + usb_mtp_object_free(s, QTAILQ_FIRST(&s->objects)); s->session = 0; usb_mtp_data_free(s->data_in); s->data_in = NULL; |