summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnuj Jaiswal <anuj.jaiswal@samsung.com>2014-08-20 18:59:26 +0530
committerTim-Philipp Müller <tim@centricular.com>2014-08-23 11:57:12 +0100
commiteb16061fa9c36d2c5a2dd734c92f1a51bcaa70a1 (patch)
tree68f0cb3b000a4b7c5f50d10a29075f01c6c3ffed
parent99204c0018a38d58a2ed60d7c9957873083d6fc0 (diff)
gst-validate: fix some minor memory leaks
https://bugzilla.gnome.org/show_bug.cgi?id=735099
-rw-r--r--validate/tools/gst-validate.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c
index b186c95..b3392d5 100644
--- a/validate/tools/gst-validate.c
+++ b/validate/tools/gst-validate.c
@@ -285,6 +285,7 @@ _execute_switch_track (GstValidateScenario * scenario,
" (from %s:%s to %s:%s)\n", index, GST_DEBUG_PAD_NAME (oldpad),
GST_DEBUG_PAD_NAME (newpad));
flags |= tflag;
+ g_free (tmp);
} else {
gst_validate_printf (action, "Disabling track type %s", type);
}
@@ -350,6 +351,7 @@ main (int argc, gchar ** argv)
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
g_printerr ("Error initializing: %s\n", err->message);
g_option_context_free (ctx);
+ g_clear_error (&err);
exit (1);
}
@@ -390,6 +392,7 @@ main (int argc, gchar ** argv)
if (!pipeline) {
g_print ("Failed to create pipeline: %s\n",
err ? err->message : "unknown reason");
+ g_clear_error (&err);
exit (1);
}
if (!GST_IS_PIPELINE (pipeline)) {
@@ -493,6 +496,7 @@ exit:
g_object_unref (pipeline);
g_object_unref (runner);
g_object_unref (monitor);
+ g_clear_error (&err);
#ifdef G_OS_UNIX
g_source_remove (signal_watch_id);
#endif