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);
}
}