[Xfce4-commits] <xfce4-weather-plugin:master> Remove uninitialized variables and do not free them (bug #9152).

Harald Judt noreply at xfce.org
Tue Jul 24 11:20:01 CEST 2012


Updating branch refs/heads/master
         to 546f670c7f466887b08a724a71e84b8d9ebf8587 (commit)
       from 8e6afef9a67f08ee247e0a15b65ded2231f08661 (commit)

commit 546f670c7f466887b08a724a71e84b8d9ebf8587
Author: Harald Judt <h.judt at gmx.at>
Date:   Tue Jul 24 11:09:05 2012 +0200

    Remove uninitialized variables and do not free them (bug #9152).
    
    Left-over from copy & pasting around code which may go unnoticed on
    linux but makes plugin crash on OpenBSD. This partly fixes bug #9152,
    but there seem to be similar problems in other parts of the code.

 panel-plugin/weather-parsers.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/panel-plugin/weather-parsers.c b/panel-plugin/weather-parsers.c
index fd3f463..c0326fb 100644
--- a/panel-plugin/weather-parsers.c
+++ b/panel-plugin/weather-parsers.c
@@ -161,19 +161,15 @@ xml_time *get_timeslice(xml_weather *data, time_t start_t, time_t end_t)
 void parse_location (xmlNode * cur_node, xml_location *loc)
 {
 	xmlNode *child_node;
-	gchar *altitude, *latitude, *longitude;
 
 	g_free(loc->altitude);
 	loc->altitude = PROP(cur_node, "altitude");
-	xmlFree(altitude);
 
 	g_free(loc->latitude);
 	loc->latitude = PROP(cur_node, "latitude");
-	xmlFree(latitude);
 
 	g_free(loc->longitude);
 	loc->longitude = PROP(cur_node, "longitude");
-	xmlFree(longitude);
 
 	for (child_node = cur_node->children; child_node;
 	     child_node = child_node->next) {


More information about the Xfce4-commits mailing list