From 93de6a179832bdae592d6b225a0dca8a09a5ed0d Mon Sep 17 00:00:00 2001 From: Nikolas Garofil Date: Mon, 19 Apr 2010 22:25:50 +0200 Subject: [PATCH] Fix bug in previous commit and a old memleak in curl --- src/ccurl_thread.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ccurl_thread.cc b/src/ccurl_thread.cc index fdd0f14b..8ed04e99 100644 --- a/src/ccurl_thread.cc +++ b/src/ccurl_thread.cc @@ -72,6 +72,7 @@ void ccurl_free_locations(ccurl_location_list &locations) i != locations.end(); i++) { free_and_zero((*i)->uri); free_and_zero((*i)->result); + (*i)->p_timed_thread.reset(); } 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"); 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; }