From: Florian Forster Date: Mon, 11 Jan 2010 14:44:14 +0000 (+0100) Subject: curl_xml plugin: Clear type_instance if it is not set. X-Git-Tag: collectd-4.10.0~72^2~11 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=d53e74a8c99cc042dd1021e4327d22a762871630;p=collectd.git curl_xml plugin: Clear type_instance if it is not set. --- diff --git a/src/curl_xml.c b/src/curl_xml.c index 589d96f0..d7b80b28 100644 --- a/src/curl_xml.c +++ b/src/curl_xml.c @@ -416,6 +416,8 @@ static int cx_submit_xpath_values (char *plugin_instance, /* {{{ */ if (instance_node != NULL) sstrncpy (vl.type_instance, (char *) xmlNodeGetContent(instance_node->nodeTab[0]), sizeof (vl.type_instance)); + else + vl.type_instance[0] = 0; } /* free up object */