[Xfce4-commits] <xfce4-weather-plugin:master> Free more data in xml_location_free().
Harald Judt
noreply at xfce.org
Wed Jul 18 11:20:02 CEST 2012
Updating branch refs/heads/master
to 9c99174c8d5458465c072ed7ba5b833d387d0cba (commit)
from 359bb2cde74fd0579924379efcb5c1ee09fb838e (commit)
commit 9c99174c8d5458465c072ed7ba5b833d387d0cba
Author: Harald Judt <h.judt at gmx.at>
Date: Wed Jul 18 11:06:09 2012 +0200
Free more data in xml_location_free().
This should fix a bunch of memory leaks.
panel-plugin/weather-parsers.c | 14 +++++++++-----
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index 472f3b6..fd3f463 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -243,22 +243,26 @@ void parse_location (xmlNode * cur_node, xml_location *loc)
static void xml_location_free(xml_location *loc)
{
- g_free(loc->temperature_unit);
+ g_free(loc->altitude);
+ g_free(loc->latitude);
+ g_free(loc->longitude);
g_free(loc->temperature_value);
+ g_free(loc->temperature_unit);
g_free(loc->wind_dir_deg);
g_free(loc->wind_dir_name);
g_free(loc->wind_speed_mps);
g_free(loc->wind_speed_beaufort);
- g_free(loc->humidity_unit);
g_free(loc->humidity_value);
- g_free(loc->pressure_unit);
+ g_free(loc->humidity_unit);
g_free(loc->pressure_value);
- g_free(loc->fog_percent);
+ g_free(loc->pressure_unit);
g_free(loc->clouds_percent[CLOUDS_PERC_LOW]);
g_free(loc->clouds_percent[CLOUDS_PERC_MED]);
g_free(loc->clouds_percent[CLOUDS_PERC_HIGH]);
- g_free(loc->precipitation_unit);
+ g_free(loc->clouds_percent[CLOUDS_PERC_CLOUDINESS]);
+ g_free(loc->fog_percent);
g_free(loc->precipitation_value);
+ g_free(loc->precipitation_unit);
g_free(loc->symbol);
g_slice_free (xml_location, loc);
}
More information about the Xfce4-commits
mailing list