From: Marc Fournier Date: Wed, 8 Jan 2014 17:05:40 +0000 (+0100) Subject: Revert "curl_xml.c: avoid using uninitalized variable in error message" X-Git-Tag: collectd-5.4.1~3^2^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=cde09b547abbeb7595d91259fcc628504d0f55a9;p=collectd.git Revert "curl_xml.c: avoid using uninitalized variable in error message" This reverts commit bbbf37d55a3959951604c4be482e9a705a0f86d9. A different fix for this problem was commited to the collectd-5.4 branch (8327ee64) and conflicts with this patch. Also, initializing url the same way as 8327ee64 does it, to avoid a merge conflict. --- diff --git a/src/curl_xml.c b/src/curl_xml.c index 77aee60b..b941f02a 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -550,13 +550,14 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ long rc; char *ptr; char *url; + url = db->url; - db->buffer_fill = 0; + db->buffer_fill = 0; status = curl_easy_perform (curl); if (status != CURLE_OK) { - ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s", - status, db->curl_errbuf); + ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)", + status, db->curl_errbuf, url); return (-1); }