X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=c5327f14b8aaeed5ad687705e6b14e69ca0b675e;hb=154cdd973167f1c9b5aab33875fe47af6a0964a6;hp=ec84df46efcf8db39133090d3fa0e34df513250c;hpb=cfe801cf0236ea2fade924e0f2b5ce3d1a51698a;p=collectd.git diff --git a/src/bind.c b/src/bind.c index ec84df46..c5327f14 100644 --- a/src/bind.c +++ b/src/bind.c @@ -267,7 +267,7 @@ static void submit (time_t ts, const char *plugin_instance, /* {{{ */ if (type_instance) { sstrncpy(vl.type_instance, type_instance, sizeof(vl.type_instance)); - replace_special (vl.plugin_instance, sizeof (vl.plugin_instance)); + replace_special (vl.type_instance, sizeof (vl.type_instance)); } plugin_dispatch_values(&vl); } /* }}} void submit */ @@ -763,7 +763,7 @@ static int bind_xml_stats_handle_zone (int version, xmlDoc *doc, /* {{{ */ xmlFree (zone_name); zone_name = NULL; - if (j >= views->zones_num) + if (j >= view->zones_num) return (0); zone_name = view->zones[j]; @@ -1666,7 +1666,7 @@ static int bind_config_add_view (oconfig_item_t *ci) /* {{{ */ if (tmp->name == NULL) { ERROR ("bind plugin: strdup failed."); - free (tmp); + sfree (views); return (-1); }