summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2015-07-16 17:50:06 +0100
committerTim-Philipp Müller <tim@centricular.com>2015-07-16 17:50:06 +0100
commit36267ca0e282f13bd95b9696b352e13984af1d5e (patch)
treed4a2b07f9968a5921f27d6346805c47bd071d2a9
parent162fc1f7d6d226b214b3d3bc50d168b9417b5db8 (diff)
harness: fix pad template leak
-rw-r--r--libs/gst/check/gstharness.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/gst/check/gstharness.c b/libs/gst/check/gstharness.c
index f61163f7b..438a52952 100644
--- a/libs/gst/check/gstharness.c
+++ b/libs/gst/check/gstharness.c
@@ -567,12 +567,16 @@ static gboolean
gst_pad_is_request_pad (GstPad * pad)
{
GstPadTemplate *temp;
+ gboolean is_request;
+
if (pad == NULL)
return FALSE;
temp = gst_pad_get_pad_template (pad);
if (temp == NULL)
return FALSE;
- return GST_PAD_TEMPLATE_PRESENCE (temp) == GST_PAD_REQUEST;
+ is_request = GST_PAD_TEMPLATE_PRESENCE (temp) == GST_PAD_REQUEST;
+ gst_object_unref (temp);
+ return is_request;
}
/**