projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-4.4' into collectd-4.5
[collectd.git]
/
src
/
ascent.c
diff --git
a/src/ascent.c
b/src/ascent.c
index
2ad641d
..
6285176
100644
(file)
--- a/
src/ascent.c
+++ b/
src/ascent.c
@@
-277,10
+277,12
@@
static int ascent_xml_submit_gauge (xmlDoc *doc, xmlNode *node, /* {{{ */
value = strtod (str_ptr, &end_ptr);
if (str_ptr == end_ptr)
{
value = strtod (str_ptr, &end_ptr);
if (str_ptr == end_ptr)
{
+ xmlFree(str_ptr);
ERROR ("ascent plugin: ascent_xml_submit_gauge: strtod failed.");
return (-1);
}
}
ERROR ("ascent plugin: ascent_xml_submit_gauge: strtod failed.");
return (-1);
}
}
+ xmlFree(str_ptr);
return (ascent_submit_gauge (plugin_instance, type, type_instance, value));
} /* }}} int ascent_xml_submit_gauge */
return (ascent_submit_gauge (plugin_instance, type, type_instance, value));
} /* }}} int ascent_xml_submit_gauge */
@@
-306,10
+308,12
@@
static int ascent_xml_read_int (xmlDoc *doc, xmlNode *node, /* {{{ */
value = strtol (str_ptr, &end_ptr, 0);
if (str_ptr == end_ptr)
{
value = strtol (str_ptr, &end_ptr, 0);
if (str_ptr == end_ptr)
{
+ xmlFree(str_ptr);
ERROR ("ascent plugin: ascent_xml_read_int: strtol failed.");
return (-1);
}
}
ERROR ("ascent plugin: ascent_xml_read_int: strtol failed.");
return (-1);
}
}
+ xmlFree(str_ptr);
*ret_value = value;
return (0);
*ret_value = value;
return (0);