tools/gst-inspect.c: Fix a few memory leaks.

Original commit message from CVS:
* tools/gst-inspect.c: (print_interfaces),
(print_element_properties_info), (print_pad_info),
(print_signal_info), (print_element_info):
Fix a few memory leaks.
This commit is contained in:
Sebastian Dröge 2008-01-29 09:43:11 +00:00
parent 98a10d1ce3
commit 5de8ceb166
2 changed files with 23 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2008-01-29 Sebastian Dröge <slomo@circular-chaos.org>
* tools/gst-inspect.c: (print_interfaces),
(print_element_properties_info), (print_pad_info),
(print_signal_info), (print_element_info):
Fix a few memory leaks.
2008-01-28 Jan Schmidt <jan.schmidt@sun.com>
* configure.ac:

View file

@ -259,8 +259,8 @@ print_interfaces (GType type)
if (_name)
g_print (_name);
g_print ("\n");
g_free (ifaces);
}
g_free (ifaces);
}
}
@ -569,6 +569,8 @@ print_element_properties_info (GstElement * element)
g_print (" Write only\n");
else
g_print ("\n");
g_value_reset (&value);
}
if (num_properties == 0)
n_print (" none\n");
@ -728,17 +730,22 @@ print_pad_info (GstElement * element)
pads = element->pads;
while (pads) {
gchar *name;
pad = GST_PAD (pads->data);
pads = g_list_next (pads);
n_print ("");
name = gst_pad_get_name (pad);
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
g_print (" SRC: '%s'", gst_pad_get_name (pad));
g_print (" SRC: '%s'", name);
else if (gst_pad_get_direction (pad) == GST_PAD_SINK)
g_print (" SINK: '%s'", gst_pad_get_name (pad));
g_print (" SINK: '%s'", name);
else
g_print (" UNKNOWN!!!: '%s'", gst_pad_get_name (pad));
g_print (" UNKNOWN!!!: '%s'", name);
g_free (name);
g_print ("\n");
@ -814,7 +821,11 @@ print_signal_info (GstElement * element)
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION)))
found_signals = g_slist_append (found_signals, query);
else
g_free (query);
}
g_free (signals);
signals = NULL;
}
if (found_signals) {
@ -1150,6 +1161,7 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
print_signal_info (element);
print_children_info (element);
gst_object_unref (element);
gst_object_unref (factory);
g_free (_name);