validate: pad-monitor: fix caps leak

Don't create othercaps when early returning.
This commit is contained in:
Guillaume Desmottes 2015-03-27 15:59:42 +01:00 committed by Thibault Saunier
parent 1bb98b49ca
commit c8e6b90f4b

View file

@ -666,7 +666,7 @@ static GstCaps *
gst_validate_pad_monitor_transform_caps (GstValidatePadMonitor * monitor,
GstCaps * caps)
{
GstCaps *othercaps = gst_caps_new_empty ();
GstCaps *othercaps;
GstCaps *new_caps;
GstIterator *iter;
gboolean done;
@ -678,6 +678,8 @@ gst_validate_pad_monitor_transform_caps (GstValidatePadMonitor * monitor,
if (caps == NULL)
return NULL;
othercaps = gst_caps_new_empty ();
iter =
gst_pad_iterate_internal_links (GST_VALIDATE_PAD_MONITOR_GET_PAD
(monitor));