X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=27164fd464fb2b024cb55048a85b530e64b5309e;hb=59547eb66a3743ca0b458222d7a4318f3e659a60;hp=2ad50f103e4ef355e42125d8f84daac0fa380d84;hpb=d6491cfcf52a74498e1becd7ef94fc8e0a5938b9;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 2ad50f10..27164fd4 100644 --- a/src/bind.c +++ b/src/bind.c @@ -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); } @@ -1709,6 +1709,7 @@ static int bind_config (oconfig_item_t *ci) /* {{{ */ return (-1); } + sfree (url); url = strdup (child->values[0].value.string); } else if (strcasecmp ("OpCodes", child->key) == 0) bind_config_set_bool ("OpCodes", &global_opcodes, child);