diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2016-05-04 13:46:46 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2016-05-05 10:00:23 +0300 |
commit | 784ebb045e2674caaa1c30cabb755ef59e5599ab (patch) | |
tree | 4c9c655f36519ce32dd15c678c55d2d3b4f7ed94 /tests/check/gst | |
parent | 30ee36e6301159b1dd9020c05c64cc0a9aa0355f (diff) |
miniobject: fix ref count leaks in tests
https://bugzilla.gnome.org/show_bug.cgi?id=765978
Diffstat (limited to 'tests/check/gst')
-rw-r--r-- | tests/check/gst/gstminiobject.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/check/gst/gstminiobject.c b/tests/check/gst/gstminiobject.c index 6351b7024..d29438e12 100644 --- a/tests/check/gst/gstminiobject.c +++ b/tests/check/gst/gstminiobject.c @@ -34,6 +34,9 @@ GST_START_TEST (test_copy) fail_if (copy == NULL, "Copy of buffer returned NULL"); fail_unless (gst_buffer_get_size (copy) == 4, "Copy of buffer has different size"); + + gst_buffer_unref (buffer); + gst_buffer_unref (copy); } GST_END_TEST; @@ -53,6 +56,9 @@ GST_START_TEST (test_is_writable) fail_if (gst_mini_object_is_writable (mobj), "A buffer with two refs should not be writable"); + + gst_buffer_unref (buffer); + gst_mini_object_unref (mobj); } GST_END_TEST; @@ -84,6 +90,8 @@ GST_START_TEST (test_make_writable) fail_unless (mobj == mobj2, "make_writable returned a copy for a buffer with refcount 1"); + gst_buffer_unref (buffer); + gst_mini_object_unref (mobj3); } GST_END_TEST; @@ -124,6 +132,9 @@ GST_START_TEST (test_ref_threaded) expected = num_threads * refs_per_thread + 1; ASSERT_MINI_OBJECT_REFCOUNT (mobj, "miniobject", expected); + + while (expected-- != 0) + gst_buffer_unref (buffer); } GST_END_TEST; |