mirror of
https://github.com/qemu/qemu.git
synced 2024-12-02 00:03:35 +08:00
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>
This commit is contained in:
parent
4c7a67f5cd
commit
b3c4d4250f
@ -908,6 +908,7 @@ static void usb_mtp_handle_reset(USBDevice *dev)
|
|||||||
|
|
||||||
trace_usb_mtp_reset(s->dev.addr);
|
trace_usb_mtp_reset(s->dev.addr);
|
||||||
|
|
||||||
|
usb_mtp_object_free(s, QTAILQ_FIRST(&s->objects));
|
||||||
s->session = 0;
|
s->session = 0;
|
||||||
usb_mtp_data_free(s->data_in);
|
usb_mtp_data_free(s->data_in);
|
||||||
s->data_in = NULL;
|
s->data_in = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user