X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fbind.c;h=b9731eeee0d89522cd3375239f07e0a4c1c50a96;hb=9c1acd10074995f6ec95eca6664c4bce4b7d7c1b;hp=2ad50f103e4ef355e42125d8f84daac0fa380d84;hpb=8395c8dbb8f5a872c5cde8db4c47a34cdb5f7c2f;p=collectd.git diff --git a/src/bind.c b/src/bind.c index 2ad50f10..b9731eee 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]; @@ -836,8 +836,6 @@ static int bind_xml_stats_search_zones (int version, xmlDoc *doc, /* {{{ */ for (i = 0; i < zone_nodes->nodesetval->nodeNr; i++) { - xmlNode *node; - node = zone_nodes->nodesetval->nodeTab[i]; assert (node != NULL); @@ -1666,7 +1664,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 +1707,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); @@ -1759,7 +1758,7 @@ static int bind_init (void) /* {{{ */ curl_easy_setopt (curl, CURLOPT_MAXREDIRS, 50L); #ifdef HAVE_CURLOPT_TIMEOUT_MS curl_easy_setopt (curl, CURLOPT_TIMEOUT_MS, (timeout >= 0) ? - (long) timeout : CDTIME_T_TO_MS(plugin_get_interval())); + (long) timeout : (long) CDTIME_T_TO_MS(plugin_get_interval())); #endif