mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-01 03:52:25 +00:00
codecanalyzer: Fix memory leaks when context parse fails
When g_option_context_parse fails, context and error variables are not getting free'd which results in memory leaks being reported. https://bugzilla.gnome.org/show_bug.cgi?id=753862
This commit is contained in:
parent
680ca5e10f
commit
581b0cfced
1 changed files with 2 additions and 0 deletions
|
@ -1015,6 +1015,8 @@ main (int argc, char *argv[])
|
|||
g_printerr ("Failed to initialize: %s\n", err->message);
|
||||
else
|
||||
g_printerr ("Failed to initialize, Unknown error\n");
|
||||
g_clear_error (&err);
|
||||
g_option_context_free (ctx);
|
||||
exit (1);
|
||||
}
|
||||
g_option_context_free (ctx);
|
||||
|
|
Loading…
Reference in a new issue