gstreamer: tests: plug some leaks

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Tue Apr 24 07:02:54 PDT 2012


Module: gstreamer
Branch: master
Commit: 678e9704fcb31c607cb4efb8bfc8857c0076686e
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=678e9704fcb31c607cb4efb8bfc8857c0076686e

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Tue Apr 24 16:01:52 2012 +0200

tests: plug some leaks

---

 tests/check/elements/queue2.c |    1 +
 tests/check/gst/gstpad.c      |    5 ++++-
 2 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/tests/check/elements/queue2.c b/tests/check/elements/queue2.c
index 598cfef..e850730 100644
--- a/tests/check/elements/queue2.c
+++ b/tests/check/elements/queue2.c
@@ -249,6 +249,7 @@ GST_START_TEST (test_filled_read)
           &buffer) == GST_FLOW_OK);
 
   fail_unless (gst_buffer_get_size (buffer) == 4 * 1024);
+  gst_buffer_unref (buffer);
 
   gst_element_set_state (queue2, GST_STATE_NULL);
 
diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c
index cb5ef36..88f93fa 100644
--- a/tests/check/gst/gstpad.c
+++ b/tests/check/gst/gstpad.c
@@ -1085,6 +1085,7 @@ test_queue_src_caps_notify (gboolean link_queue)
 {
   GstElement *queue;
   GstPad *src, *sink, *another_pad;
+  GstCaps *caps;
 
   queue = gst_element_factory_make ("queue", NULL);
   fail_unless (queue != NULL);
@@ -1111,7 +1112,9 @@ test_queue_src_caps_notify (gboolean link_queue)
 
   g_signal_connect (src, "notify::caps", G_CALLBACK (caps_notify), NULL);
 
-  gst_pad_send_event (sink, gst_event_new_caps (gst_caps_from_string ("caps")));
+  caps = gst_caps_from_string ("caps");
+  gst_pad_send_event (sink, gst_event_new_caps (caps));
+  gst_caps_unref (caps);
 
   g_usleep (10000);
 



More information about the gstreamer-commits mailing list