summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-01-29 09:43:11 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-01-29 09:43:11 +0000
commit5de8ceb166c843a40f745a97ce3a905e3f1f3297 (patch)
treebb7ccca9ef38535903109c315ac33b7e17eb1556 /tools
parent98a10d1ce35d14d87ab93b56547b3056df0d94e9 (diff)
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.
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-inspect.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c
index 7712225d27..0c380f6555 100644
--- a/tools/gst-inspect.c
+++ b/tools/gst-inspect.c
@@ -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);