[0.11] gstreamer: queue2: fix memory leak

Wim Taymans wtay at kemper.freedesktop.org
Fri Jan 27 06:35:56 PST 2012


Module: gstreamer
Branch: 0.11
Commit: fe9e2844639fa559a90131ad629eed0ace917f30
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=fe9e2844639fa559a90131ad629eed0ace917f30

Author: Wim Taymans <wim.taymans at collabora.co.uk>
Date:   Fri Jan 27 15:32:37 2012 +0100

queue2: fix memory leak

unmap the buffer memory on errors.

---

 plugins/elements/gstqueue2.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/plugins/elements/gstqueue2.c b/plugins/elements/gstqueue2.c
index 524c6ed..8c26224 100644
--- a/plugins/elements/gstqueue2.c
+++ b/plugins/elements/gstqueue2.c
@@ -1288,12 +1288,14 @@ gst_queue2_create_read (GstQueue2 * queue, guint64 offset, guint length,
 hit_eos:
   {
     GST_DEBUG_OBJECT (queue, "EOS hit and we don't have any requested data");
+    gst_buffer_unmap (buf, &info);
     gst_buffer_unref (buf);
     return GST_FLOW_EOS;
   }
 out_flushing:
   {
     GST_DEBUG_OBJECT (queue, "we are flushing");
+    gst_buffer_unmap (buf, &info);
     gst_buffer_unref (buf);
     return GST_FLOW_WRONG_STATE;
   }



More information about the gstreamer-commits mailing list