gapplication: Properly free the option_strings

option_strings gets set in g_application_add_main_option, so it can
contain elements independent from packed_options.

https://bugzilla.gnome.org/show_bug.cgi?id=773303
This commit is contained in:
Timm Bäder 2016-10-21 10:13:38 +02:00 committed by Matthias Clasen
parent 7470cc902b
commit f14389bec9

View File

@ -1254,10 +1254,10 @@ g_application_finalize (GObject *object)
if (application->priv->main_options)
g_option_group_unref (application->priv->main_options);
if (application->priv->packed_options)
{
g_slist_free_full (application->priv->option_strings, g_free);
g_hash_table_unref (application->priv->packed_options);
}
g_hash_table_unref (application->priv->packed_options);
g_slist_free_full (application->priv->option_strings, g_free);
if (application->priv->impl)
g_application_impl_destroy (application->priv->impl);
g_free (application->priv->id);