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-5.7'
[collectd.git]
/
src
/
bind.c
diff --git
a/src/bind.c
b/src/bind.c
index
02bffd3
..
b7308ad
100644
(file)
--- a/
src/bind.c
+++ b/
src/bind.c
@@
-522,8
+522,10
@@
static int bind_parse_generic_name_value(const char *xpath_expression, /* {{{ */
status = bind_xml_read_gauge(doc, counter, &value.gauge);
else
status = bind_xml_read_derive(doc, counter, &value.derive);
status = bind_xml_read_gauge(doc, counter, &value.gauge);
else
status = bind_xml_read_derive(doc, counter, &value.derive);
- if (status != 0)
+ if (status != 0) {
+ xmlFree(name);
continue;
continue;
+ }
status = (*list_callback)(name, value, current_time, user_data);
if (status == 0)
status = (*list_callback)(name, value, current_time, user_data);
if (status == 0)
@@
-655,12
+657,16
@@
static int bind_parse_generic_name_attr_value_list(
status = bind_xml_read_gauge(doc, child, &value.gauge);
else
status = bind_xml_read_derive(doc, child, &value.derive);
status = bind_xml_read_gauge(doc, child, &value.gauge);
else
status = bind_xml_read_derive(doc, child, &value.derive);
- if (status != 0)
+ if (status != 0) {
+ xmlFree(attr_name);
continue;
continue;
+ }
status = (*list_callback)(attr_name, value, current_time, user_data);
if (status == 0)
num_entries++;
status = (*list_callback)(attr_name, value, current_time, user_data);
if (status == 0)
num_entries++;
+
+ xmlFree(attr_name);
}
}
}
}