mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +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;
|
||||
GOptionContext *context;
|
||||
gchar *desc;
|
||||
gboolean ret;
|
||||
|
||||
context = g_option_context_new ("- test v4l2src live renegotition");
|
||||
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
|
||||
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_error_free (error);
|
||||
return 1;
|
||||
|
|
Loading…
Reference in a new issue