From 36267ca0e282f13bd95b9696b352e13984af1d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 16 Jul 2015 17:50:06 +0100 Subject: [PATCH] harness: fix pad template leak --- libs/gst/check/gstharness.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libs/gst/check/gstharness.c b/libs/gst/check/gstharness.c index f61163f7b9..438a529527 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; } /**