1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-12-26 12:27:52 +00:00

Fix memleak in $weather

This commit is contained in:
Nikolas Garofil 2009-07-23 18:50:08 +02:00
parent 03a0e8ae19
commit 7e7a193b74

View File

@ -2873,6 +2873,9 @@ static struct text_object *construct_text_object(const char *s,
if (argc >= 3) {
if (process_weather_uri(uri, locID)) {
free(data_type);
free(uri);
free(locID);
CRIT_ERR(obj, free_at_crash, \
"could not recognize the weather uri");
}
@ -2892,7 +2895,10 @@ static struct text_object *construct_text_object(const char *s,
DBGP("weather: fetching %s from %s every %d seconds", \
data_type, uri, obj->data.weather.interval);
} else {
ERR("wrong number of arguments for $weather");
free(data_type);
free(uri);
free(locID);
CRIT_ERR(obj, free_at_crash, "wrong number of arguments for $weather");
}
} else {
CRIT_ERR(obj, free_at_crash, "weather needs arguments: <uri> <locID> <data_type> [interval in minutes]");