[libchamplain] champlain-view: Fix memory leak in tile_map_set



commit a1a5a8dd58ee31fd2e27a9407846f29daeaea723
Author: Marius Stanciu <stanciumarius94 gmail com>
Date:   Wed Apr 6 19:40:33 2016 +0300

    champlain-view: Fix memory leak in tile_map_set
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764692

 champlain/champlain-view.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index f7af4fc..49bb22b 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -2294,7 +2294,10 @@ tile_map_set (ChamplainView *view, gint tile_x, gint tile_y, gboolean value)
   if (value)
     g_hash_table_insert (priv->tile_map, key, GINT_TO_POINTER (TRUE));
   else
-    g_hash_table_remove (priv->tile_map, key);
+    {
+      g_hash_table_remove (priv->tile_map, key);
+      g_slice_free (gint64, key);
+    }
 }
 
 


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