discoverer: fix pad leak

This commit is contained in:
Vincent Penquerc'h 2012-01-11 11:55:36 +00:00
parent 83c9396850
commit 7ad6431837

View file

@ -821,8 +821,10 @@ find_stream_for_node (GstDiscoverer * dc, const GstStructure * topology)
gst_structure_id_get (topology, _TOPOLOGY_PAD_QUARK,
GST_TYPE_PAD, &pad, NULL);
if (!dc->priv->streams)
if (!dc->priv->streams) {
gst_object_unref (pad);
return NULL;
}
for (i = 0, tmp = dc->priv->streams; tmp; tmp = tmp->next, i++) {
ps = (PrivateStream *) tmp->data;