mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-13 12:51:16 +00:00
playback/player: gst-play: Fix leak of GError and GOptionContext on parsing errors
This commit is contained in:
parent
c581233464
commit
e2581982a6
1 changed files with 2 additions and 0 deletions
|
@ -674,6 +674,8 @@ main (int argc, char **argv)
|
||||||
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
g_option_context_add_group (ctx, gst_init_get_option_group ());
|
||||||
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
if (!g_option_context_parse (ctx, &argc, &argv, &err)) {
|
||||||
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
|
g_print ("Error initializing: %s\n", GST_STR_NULL (err->message));
|
||||||
|
g_clear_error (&err);
|
||||||
|
g_option_context_free (ctx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
g_option_context_free (ctx);
|
g_option_context_free (ctx);
|
||||||
|
|
Loading…
Reference in a new issue