[glib] gapplication: Properly free the option_strings



commit f14389bec91f2a09bc0c621070df5585a36bb52f
Author: Timm Bäder <mail baedert org>
Date:   Fri Oct 21 10:13:38 2016 +0200

    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

 gio/gapplication.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gio/gapplication.c b/gio/gapplication.c
index dbf4812..0ffbc66 100644
--- a/gio/gapplication.c
+++ b/gio/gapplication.c
@@ -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);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]