aboutsummaryrefslogtreecommitdiffstats
path: root/my-evolution/e-summary-weather.c
diff options
context:
space:
mode:
Diffstat (limited to 'my-evolution/e-summary-weather.c')
-rw-r--r--my-evolution/e-summary-weather.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/my-evolution/e-summary-weather.c b/my-evolution/e-summary-weather.c
index 8f97c813c1..164278fe50 100644
--- a/my-evolution/e-summary-weather.c
+++ b/my-evolution/e-summary-weather.c
@@ -324,6 +324,18 @@ e_summary_weather_update (ESummary *summary)
}
static void
+weather_free (Weather *w)
+{
+ g_return_if_fail (w != NULL);
+
+ if (w->handle != NULL) {
+ gnome_vfs_async_cancel (w->handle);
+ }
+ g_free (w->location);
+ g_free (w->html);
+ g_free (w);
+}
+static void
e_summary_weather_add_location (ESummary *summary,
const char *location)
{
@@ -701,10 +713,7 @@ e_summary_weather_reconfigure (ESummary *summary)
Weather *w;
w = old->data;
- g_free (w->location);
- g_free (w->html);
- g_free (w->metar);
- g_free (w);
+ weather_free (w);
}
g_list_free (weather->weathers);
weather->weathers = NULL;