mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-19 00:01:23 +00:00
gst-inspect: Don't leak list
Just iterate the list instead of trying to be smart... Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3497>
This commit is contained in:
parent
8f96453b0f
commit
0841e846a3
1 changed files with 5 additions and 5 deletions
|
@ -808,7 +808,7 @@ gst_static_pad_compare_func (gconstpointer p1, gconstpointer p2)
|
||||||
static void
|
static void
|
||||||
print_pad_templates_info (GstElement * element, GstElementFactory * factory)
|
print_pad_templates_info (GstElement * element, GstElementFactory * factory)
|
||||||
{
|
{
|
||||||
GList *pads;
|
GList *pads, *tmp;
|
||||||
GstStaticPadTemplate *padtemplate;
|
GstStaticPadTemplate *padtemplate;
|
||||||
GstPadTemplate *tmpl;
|
GstPadTemplate *tmpl;
|
||||||
|
|
||||||
|
@ -824,9 +824,9 @@ print_pad_templates_info (GstElement * element, GstElementFactory * factory)
|
||||||
pads = g_list_copy ((GList *)
|
pads = g_list_copy ((GList *)
|
||||||
gst_element_factory_get_static_pad_templates (factory));
|
gst_element_factory_get_static_pad_templates (factory));
|
||||||
pads = g_list_sort (pads, gst_static_pad_compare_func);
|
pads = g_list_sort (pads, gst_static_pad_compare_func);
|
||||||
while (pads) {
|
|
||||||
padtemplate = (GstStaticPadTemplate *) (pads->data);
|
for (tmp = pads; tmp; tmp = tmp->next) {
|
||||||
pads = g_list_next (pads);
|
padtemplate = (GstStaticPadTemplate *) (tmp->data);
|
||||||
|
|
||||||
if (padtemplate->direction == GST_PAD_SRC)
|
if (padtemplate->direction == GST_PAD_SRC)
|
||||||
n_print ("%sSRC template%s: %s'%s'%s\n", PROP_NAME_COLOR, RESET_COLOR,
|
n_print ("%sSRC template%s: %s'%s'%s\n", PROP_NAME_COLOR, RESET_COLOR,
|
||||||
|
@ -883,7 +883,7 @@ print_pad_templates_info (GstElement * element, GstElementFactory * factory)
|
||||||
|
|
||||||
pop_indent ();
|
pop_indent ();
|
||||||
|
|
||||||
if (pads != NULL)
|
if (tmp->next)
|
||||||
n_print ("\n");
|
n_print ("\n");
|
||||||
}
|
}
|
||||||
g_list_free (pads);
|
g_list_free (pads);
|
||||||
|
|
Loading…
Reference in a new issue