[gtk+/portal] Don't leak keys



commit 3e75bd324f281dc7d494f1a4c198c585d1f1259e
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Jul 6 20:57:58 2016 -0400

    Don't leak keys
    
    Spotted by Cosimo.

 gtk/gtkfilechooserwidget.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index a9868f2..3d995c0 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -8712,7 +8712,7 @@ gtk_file_chooser_widget_add_choice (GtkFileChooser  *chooser,
 
   if (priv->choices == NULL)
     {
-      priv->choices = g_hash_table_new (g_str_hash, g_str_equal);
+      priv->choices = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
       priv->choice_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
       set_extra_widget (impl, priv->choice_box);
     }


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