From e2581982a6629066c53985ad7f42b45a044de640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 20 Aug 2015 10:50:30 +0300 Subject: [PATCH] playback/player: gst-play: Fix leak of GError and GOptionContext on parsing errors --- playback/player/gst-play/gst-play.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/playback/player/gst-play/gst-play.c b/playback/player/gst-play/gst-play.c index 84176690ed..e00a7fc4e8 100644 --- a/playback/player/gst-play/gst-play.c +++ b/playback/player/gst-play/gst-play.c @@ -674,6 +674,8 @@ main (int argc, char **argv) g_option_context_add_group (ctx, gst_init_get_option_group ()); if (!g_option_context_parse (ctx, &argc, &argv, &err)) { g_print ("Error initializing: %s\n", GST_STR_NULL (err->message)); + g_clear_error (&err); + g_option_context_free (ctx); return 1; } g_option_context_free (ctx);