summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 58ef597)
raw | patch | inline | side by side (parent: 58ef597)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Tue, 30 May 2017 15:25:17 +0000 (17:25 +0200) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 1 Jun 2017 18:36:48 +0000 (20:36 +0200) |
Fixes: #2303
src/bind.c | patch | blob | history |
diff --git a/src/bind.c b/src/bind.c
index 4860f1b6045667bcfebbb264ffb9ff2100e9ddc1..853b9c26a352d912d851eee8a6803f8fda42677b 100644 (file)
--- a/src/bind.c
+++ b/src/bind.c
@@ -526,8 +526,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);
- if (status != 0)
+ if (status != 0) {
+ xmlFree(name);
continue;
+ }
status = (*list_callback)(name, value, current_time, user_data);
if (status == 0)
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;
+ }
status = (*list_callback)(attr_name, value, current_time, user_data);
if (status == 0)
num_entries++;
+
+ xmlFree(attr_name);
}
}