From fb1c9fcb9b5b400ba0b94e942e8033b66d6c3162 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 10 Sep 2001 22:48:52 +0000 Subject: Purification. * e-summary.c (destroy): free the protocol hash. * e-summary-rdf.c (tree_walk): plug a leak. * e-summary-weather.c (e_summary_weather_init_locations): Don't insert duplicates into the hash table. * e-summary-mail.c (e_summary_mail_generate_html): free old html before setting new * e-summary.c (e_summary_draw): free weather and rdf html strings. * e-summary-preferences.c (save_known_rdfs): free strings. svn path=/trunk/; revision=12747 --- my-evolution/e-summary-weather.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'my-evolution/e-summary-weather.c') diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c index e1aa113095..6456d2a2ea 100644 --- a/my-evolution/e-summary-weather.c +++ b/my-evolution/e-summary-weather.c @@ -445,10 +445,12 @@ e_summary_weather_init_locations (void) &locdata); g_return_val_if_fail (nlocdata == 4, FALSE); - location = weather_location_new (locdata); - g_hash_table_insert (locations_hash, - g_strdup (locdata[1]), - location); + if (!g_hash_table_lookup (locations_hash, locdata[1])) { + location = weather_location_new (locdata); + g_hash_table_insert (locations_hash, + g_strdup (locdata[1]), + location); + } g_strfreev (locdata); } -- cgit v1.2.3