All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: qemu-devel@nongnu.org
Cc: Bandan Das <bsd@redhat.com>, kraxel@redhat.com
Subject: [Qemu-devel] [PATCH v2 2/4] usb-mtp: free objects on a mtp reset
Date: Tue, 10 Nov 2015 17:58:17 -0500	[thread overview]
Message-ID: <1447196299-16091-3-git-send-email-bsd@redhat.com> (raw)
In-Reply-To: <1447196299-16091-1-git-send-email-bsd@redhat.com>

On a reset, call usb_mtp_object_free on all objects and their children

Signed-off-by: Bandan Das <bsd@redhat.com>
---
 hw/usb/dev-mtp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index eea2dad..c39b81a 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -907,6 +907,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;
-- 
2.5.0

  parent reply	other threads:[~2015-11-10 22:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 22:58 [Qemu-devel] [PATCH v2 0/4] usb-mtp events support Bandan Das
2015-11-10 22:58 ` [Qemu-devel] [PATCH v2 1/4] usb-mtp: use a list for keeping track of children Bandan Das
2015-11-10 22:58 ` Bandan Das [this message]
2015-11-10 22:58 ` [Qemu-devel] [PATCH v2 3/4] usb-mtp: Add support for inotify based file monitoring Bandan Das
2015-11-13 12:34   ` Gerd Hoffmann
2015-11-13 17:16     ` Bandan Das
2015-11-10 22:58 ` [Qemu-devel] [PATCH v2 4/4] usb-mtp: add support for basic mtp events Bandan Das

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1447196299-16091-3-git-send-email-bsd@redhat.com \
    --to=bsd@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.