mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 08:11:16 +00:00
utils: fix element leak in find_common_root()
The root element was not unreffed when iterating over ancestors. https://bugzilla.gnome.org/show_bug.cgi?id=765961
This commit is contained in:
parent
4fe32b923f
commit
30ee36e630
2 changed files with 3 additions and 0 deletions
|
@ -1363,11 +1363,13 @@ find_common_root (GstObject * o1, GstObject * o2)
|
|||
gst_object_unref (kid2);
|
||||
return root;
|
||||
}
|
||||
gst_object_unref (root);
|
||||
root = kid2;
|
||||
if (!object_has_ancestor (o2, kid1, &kid2)) {
|
||||
gst_object_unref (kid1);
|
||||
return root;
|
||||
}
|
||||
gst_object_unref (root);
|
||||
root = kid1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ setup_pipeline (const gchar * pipe_descr)
|
|||
fail_unless (pipeline != NULL, "Failed to create pipeline %s", pipe_descr);
|
||||
/* Newly returned object should be floating reffed */
|
||||
fail_unless (g_object_is_floating (pipeline));
|
||||
g_assert_cmpuint (G_OBJECT (pipeline)->ref_count, ==, 1);
|
||||
return pipeline;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue