diff --git a/tests/examples/multifilesrc.c b/tests/examples/multifilesrc.c index 6e9e3fc21c..05a4c29883 100644 --- a/tests/examples/multifilesrc.c +++ b/tests/examples/multifilesrc.c @@ -51,6 +51,8 @@ main (int argc, gchar ** argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tests/examples/overlays.c b/tests/examples/overlays.c index c75e0c6f4b..d0edc3b5b2 100644 --- a/tests/examples/overlays.c +++ b/tests/examples/overlays.c @@ -149,6 +149,8 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tests/examples/simple1.c b/tests/examples/simple1.c index c7c6be864b..bc008e6868 100644 --- a/tests/examples/simple1.c +++ b/tests/examples/simple1.c @@ -57,6 +57,8 @@ main (int argc, gchar ** argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tests/examples/test4.c b/tests/examples/test4.c index 3497252e65..070b869ec1 100644 --- a/tests/examples/test4.c +++ b/tests/examples/test4.c @@ -81,8 +81,10 @@ 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); return -1; } + g_option_context_free (ctx); if (argc < 3) { g_print ("Usage: %s \n", argv[0]); diff --git a/tests/examples/text_properties.c b/tests/examples/text_properties.c index 8a73a70b4e..3dc6e06115 100644 --- a/tests/examples/text_properties.c +++ b/tests/examples/text_properties.c @@ -112,6 +112,8 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tests/examples/thumbnails.c b/tests/examples/thumbnails.c index ea598720a8..9211bc7f2e 100644 --- a/tests/examples/thumbnails.c +++ b/tests/examples/thumbnails.c @@ -152,6 +152,7 @@ main (int argc, gchar ** argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", err->message); g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tests/examples/transition.c b/tests/examples/transition.c index 83d46b4c4e..7992e2ac2c 100644 --- a/tests/examples/transition.c +++ b/tests/examples/transition.c @@ -173,6 +173,8 @@ main (int argc, char **argv) if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing %s\n", err->message); + g_option_context_free (ctx); + g_clear_error (&err); exit (1); } diff --git a/tools/ges-launcher.c b/tools/ges-launcher.c index da20abb246..44ce0ca394 100644 --- a/tools/ges-launcher.c +++ b/tools/ges-launcher.c @@ -288,7 +288,7 @@ bus_message_cb (GstBus * bus, GstMessage * message, GESLauncher * self) g_printerr ("ERROR from element %s: %s\n", GST_OBJECT_NAME (message->src), err->message); g_printerr ("Debugging info: %s\n", (dbg_info) ? dbg_info : "none"); - g_error_free (err); + g_clear_error (&err); g_free (dbg_info); self->priv->seenerrors = TRUE; g_application_quit (G_APPLICATION (self)); @@ -733,7 +733,7 @@ _local_command_line (GApplication * application, gchar ** arguments[], if (!g_application_register (application, NULL, &error)) { *exit_status = 1; - g_error_free (error); + g_clear_error (&error); return FALSE; }