[gtk+] Plug a memory leak



commit 4050abe2fa435403b531bb49da34ec5b623cbf37
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jul 27 14:54:13 2015 -0400

    Plug a memory leak
    
    GtkCssProvider was using the wrong unref function for GtkCssKeyframe
    objects. Funnily, this didn't crash at all, the refcount was at the
    same place in the struct - it just didn't free all the memory, causing
    valgrind to complain.

 gtk/gtkcssprovider.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkcssprovider.c b/gtk/gtkcssprovider.c
index eb582bf..f758cfc 100644
--- a/gtk/gtkcssprovider.c
+++ b/gtk/gtkcssprovider.c
@@ -1586,7 +1586,7 @@ gtk_css_provider_init (GtkCssProvider *css_provider)
                                                  (GDestroyNotify) _gtk_css_value_unref);
   priv->keyframes = g_hash_table_new_full (g_str_hash, g_str_equal,
                                            (GDestroyNotify) g_free,
-                                           (GDestroyNotify) _gtk_css_value_unref);
+                                           (GDestroyNotify) _gtk_css_keyframes_unref);
 }
 
 static void


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