diff --git a/examples/test-launch.c b/examples/test-launch.c index 24e1271e61..03bcd410aa 100644 --- a/examples/test-launch.c +++ b/examples/test-launch.c @@ -47,6 +47,8 @@ main (int argc, char *argv[]) g_option_context_add_group (optctx, gst_init_get_option_group ()); if (!g_option_context_parse (optctx, &argc, &argv, &error)) { g_printerr ("Error parsing options: %s\n", error->message); + g_option_context_free (optctx); + g_clear_error (&error); return -1; } g_option_context_free (optctx); diff --git a/examples/test-mp4.c b/examples/test-mp4.c index 9bcaab45e2..34b8906aab 100644 --- a/examples/test-mp4.c +++ b/examples/test-mp4.c @@ -102,6 +102,8 @@ main (int argc, char *argv[]) g_option_context_add_group (optctx, gst_init_get_option_group ()); if (!g_option_context_parse (optctx, &argc, &argv, &error)) { g_printerr ("Error parsing options: %s\n", error->message); + g_option_context_free (optctx); + g_clear_error (&error); return -1; } diff --git a/examples/test-ogg.c b/examples/test-ogg.c index c22e638ba2..dc052b42bb 100644 --- a/examples/test-ogg.c +++ b/examples/test-ogg.c @@ -47,6 +47,8 @@ main (int argc, char *argv[]) g_option_context_add_group (optctx, gst_init_get_option_group ()); if (!g_option_context_parse (optctx, &argc, &argv, &error)) { g_printerr ("Error parsing options: %s\n", error->message); + g_option_context_free (optctx); + g_clear_error (&error); return -1; } g_option_context_free (optctx); diff --git a/examples/test-record.c b/examples/test-record.c index 1c375038f5..edd66ad586 100644 --- a/examples/test-record.c +++ b/examples/test-record.c @@ -49,6 +49,8 @@ main (int argc, char *argv[]) g_option_context_add_group (optctx, gst_init_get_option_group ()); if (!g_option_context_parse (optctx, &argc, &argv, &error)) { g_printerr ("Error parsing options: %s\n", error->message); + g_option_context_free (optctx); + g_clear_error (&error); return -1; } diff --git a/examples/test-uri.c b/examples/test-uri.c index 8a9c56c238..784bf9ad6b 100644 --- a/examples/test-uri.c +++ b/examples/test-uri.c @@ -76,6 +76,8 @@ main (int argc, gchar * argv[]) g_option_context_add_group (optctx, gst_init_get_option_group ()); if (!g_option_context_parse (optctx, &argc, &argv, &error)) { g_printerr ("Error parsing options: %s\n", error->message); + g_option_context_free (optctx); + g_clear_error (&error); return -1; } g_option_context_free (optctx);