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, gst_validate_pad_monitor_transform_caps (GstValidatePadMonitor * monitor,
GstCaps * caps) GstCaps * caps)
{ {
GstCaps *othercaps = gst_caps_new_empty (); GstCaps *othercaps;
GstCaps *new_caps; GstCaps *new_caps;
GstIterator *iter; GstIterator *iter;
gboolean done; gboolean done;
@ -678,6 +678,8 @@ gst_validate_pad_monitor_transform_caps (GstValidatePadMonitor * monitor,
if (caps == NULL) if (caps == NULL)
return NULL; return NULL;
othercaps = gst_caps_new_empty ();
iter = iter =
gst_pad_iterate_internal_links (GST_VALIDATE_PAD_MONITOR_GET_PAD gst_pad_iterate_internal_links (GST_VALIDATE_PAD_MONITOR_GET_PAD
(monitor)); (monitor));