mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-14 11:33:14 +00:00
Fix bug in previous commit and a old memleak in curl
This commit is contained in:
parent
bc5a414594
commit
93de6a1798
@ -72,6 +72,7 @@ void ccurl_free_locations(ccurl_location_list &locations)
|
|||||||
i != locations.end(); i++) {
|
i != locations.end(); i++) {
|
||||||
free_and_zero((*i)->uri);
|
free_and_zero((*i)->uri);
|
||||||
free_and_zero((*i)->result);
|
free_and_zero((*i)->result);
|
||||||
|
(*i)->p_timed_thread.reset();
|
||||||
}
|
}
|
||||||
locations.clear();
|
locations.clear();
|
||||||
}
|
}
|
||||||
@ -222,7 +223,10 @@ void curl_parse_arg(struct text_object *obj, const char *arg)
|
|||||||
NORM_ERR("wrong number of arguments for $curl");
|
NORM_ERR("wrong number of arguments for $curl");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cd->interval = (argc == 2 && interval >= 0) ? interval * 60 : 15*60;
|
if (argc == 1)
|
||||||
|
cd->interval = 15*60;
|
||||||
|
else
|
||||||
|
cd->interval = interval > 0 ? interval * 60 : update_interval;
|
||||||
obj->data.opaque = cd;
|
obj->data.opaque = cd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user