summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorBandan Das <bsd@redhat.com>2015-11-23 16:37:03 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:18 -0600
commitdb112fb7b6ade53f9f2e7195142b295ef64383d8 (patch)
treed0b2fdd8d8cf3abcba38e7f592d507b685e245a6 /hw
parent49ea58c2357df159800db73928d5dba0e4667c29 (diff)
downloadhqemu-db112fb7b6ade53f9f2e7195142b295ef64383d8.zip
hqemu-db112fb7b6ade53f9f2e7195142b295ef64383d8.tar.gz
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.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 10b657d..5b71691 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;
OpenPOWER on IntegriCloud