[geocode-glib] lib: Fix memory leak looking for a single item



commit 79353ab4973995f353f4d31e31dc101f6931a3cf
Author: Bastien Nocera <hadess hadess net>
Date:   Mon Dec 3 10:14:38 2012 +0100

    lib: Fix memory leak looking for a single item

 geocode-glib/geocode-forward.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/geocode-glib/geocode-forward.c b/geocode-glib/geocode-forward.c
index 5a9a279..b7ce2f2 100644
--- a/geocode-glib/geocode-forward.c
+++ b/geocode-glib/geocode-forward.c
@@ -110,6 +110,7 @@ _geocode_parse_single_result_json (const char  *contents,
 	latitude = g_ascii_strtod (g_hash_table_lookup (ht, "latitude"), NULL);
 	loc = geocode_location_new_with_description (longitude, latitude,
 						     g_hash_table_lookup (ht, "line2"));
+	g_hash_table_destroy (ht);
 
 	return g_list_append (NULL, loc);
 }



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