mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-09-18 11:18:48 +00:00
v4l2-renegotiate: Don't leak the option context
This commit is contained in:
parent
22a5f56f2a
commit
3ea2621036
1 changed files with 5 additions and 1 deletions
|
@ -120,11 +120,15 @@ main (gint argc, gchar ** argv)
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
gchar *desc;
|
gchar *desc;
|
||||||
|
gboolean ret;
|
||||||
|
|
||||||
context = g_option_context_new ("- test v4l2src live renegotition");
|
context = g_option_context_new ("- test v4l2src live renegotition");
|
||||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||||
g_option_context_add_group (context, gst_init_get_option_group ());
|
g_option_context_add_group (context, gst_init_get_option_group ());
|
||||||
if (!g_option_context_parse (context, &argc, &argv, &error)) {
|
ret = g_option_context_parse (context, &argc, &argv, &error);
|
||||||
|
g_option_context_free (context);
|
||||||
|
|
||||||
|
if (!ret) {
|
||||||
g_print ("option parsing failed: %s\n", error->message);
|
g_print ("option parsing failed: %s\n", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in a new issue