mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 09:10:36 +00:00
pad: Fix memory leak in the unit test
This commit is contained in:
parent
cc7113b619
commit
2253f8fa6f
1 changed files with 3 additions and 2 deletions
|
@ -232,8 +232,10 @@ sticky_event (GstPad * pad, GstObject * parent, GstEvent * event)
|
|||
|| GST_EVENT_TYPE (event) == GST_EVENT_STREAM_START
|
||||
|| GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT);
|
||||
|
||||
if (GST_EVENT_TYPE (event) != GST_EVENT_CAPS)
|
||||
if (GST_EVENT_TYPE (event) != GST_EVENT_CAPS) {
|
||||
gst_event_unref (event);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/* Ensure we get here just once: */
|
||||
fail_unless (event_caps == NULL);
|
||||
|
@ -304,7 +306,6 @@ GST_START_TEST (test_sticky_caps_unlinked)
|
|||
|
||||
gst_caps_replace (&caps, NULL);
|
||||
gst_caps_replace (&event_caps, NULL);
|
||||
|
||||
ASSERT_OBJECT_REFCOUNT (src, "src", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (sink, "sink", 1);
|
||||
gst_object_unref (src);
|
||||
|
|
Loading…
Reference in a new issue