mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 16:26:39 +00:00
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:
parent
4bf6171fc1
commit
d7a94887b5
2 changed files with 23 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2008-02-02 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-02-01 Thijs Vermeir <thijsvermeir@gmail.com>
|
2008-02-01 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||||
|
|
||||||
* docs/libs/gstreamer-libs-sections.txt:
|
* docs/libs/gstreamer-libs-sections.txt:
|
||||||
|
|
|
@ -259,8 +259,8 @@ print_interfaces (GType type)
|
||||||
if (_name)
|
if (_name)
|
||||||
g_print (_name);
|
g_print (_name);
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
g_free (ifaces);
|
|
||||||
}
|
}
|
||||||
|
g_free (ifaces);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -569,6 +569,8 @@ print_element_properties_info (GstElement * element)
|
||||||
g_print (" Write only\n");
|
g_print (" Write only\n");
|
||||||
else
|
else
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
|
|
||||||
|
g_value_reset (&value);
|
||||||
}
|
}
|
||||||
if (num_properties == 0)
|
if (num_properties == 0)
|
||||||
n_print (" none\n");
|
n_print (" none\n");
|
||||||
|
@ -728,17 +730,22 @@ print_pad_info (GstElement * element)
|
||||||
|
|
||||||
pads = element->pads;
|
pads = element->pads;
|
||||||
while (pads) {
|
while (pads) {
|
||||||
|
gchar *name;
|
||||||
|
|
||||||
pad = GST_PAD (pads->data);
|
pad = GST_PAD (pads->data);
|
||||||
pads = g_list_next (pads);
|
pads = g_list_next (pads);
|
||||||
|
|
||||||
n_print ("");
|
n_print ("");
|
||||||
|
|
||||||
|
name = gst_pad_get_name (pad);
|
||||||
if (gst_pad_get_direction (pad) == GST_PAD_SRC)
|
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)
|
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
|
else
|
||||||
g_print (" UNKNOWN!!!: '%s'", gst_pad_get_name (pad));
|
g_print (" UNKNOWN!!!: '%s'", name);
|
||||||
|
|
||||||
|
g_free (name);
|
||||||
|
|
||||||
g_print ("\n");
|
g_print ("\n");
|
||||||
|
|
||||||
|
@ -814,7 +821,11 @@ print_signal_info (GstElement * element)
|
||||||
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
if ((k == 0 && !(query->signal_flags & G_SIGNAL_ACTION)) ||
|
||||||
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION)))
|
(k == 1 && (query->signal_flags & G_SIGNAL_ACTION)))
|
||||||
found_signals = g_slist_append (found_signals, query);
|
found_signals = g_slist_append (found_signals, query);
|
||||||
|
else
|
||||||
|
g_free (query);
|
||||||
}
|
}
|
||||||
|
g_free (signals);
|
||||||
|
signals = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (found_signals) {
|
if (found_signals) {
|
||||||
|
@ -1150,6 +1161,7 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
|
||||||
print_signal_info (element);
|
print_signal_info (element);
|
||||||
print_children_info (element);
|
print_children_info (element);
|
||||||
|
|
||||||
|
gst_object_unref (element);
|
||||||
gst_object_unref (factory);
|
gst_object_unref (factory);
|
||||||
g_free (_name);
|
g_free (_name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue