[collectd] Fixes for BIND plugin
    Graham Breed 
    graham.breed at appliansys.com
       
    Fri Jun  6 13:18:15 CEST 2014
    
    
  
We have two fixes for the BIND plugin.  Firstly, for it to count 
zones correctly:
---
  src/bind.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bind.c b/src/bind.c
index 2f990a2..bf9080d 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -667,7 +667,7 @@ static int bind_xml_stats_handle_zone (int 
version, xmlDoc *doc, /* {{{ */
    xmlFree (zone_name);
    zone_name = NULL;
-  if (j >= views_num)
+  if (j >= view->zones_num)
    {
      xmlXPathFreeObject (path_obj);
      return (0);
-- 
Secondly, a fix for a memory leak:
---
  src/bind.c | 1 +
  1 file changed, 1 insertion(+)
diff --git a/src/bind.c b/src/bind.c
index bf9080d..2a757b4 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -371,6 +371,7 @@ static int bind_xml_read_derive (xmlDoc 
*doc, xmlNode *node, /* {{{ */
          str_ptr);
      return (-1);
    }
+  xmlFree (str_ptr);
    *ret_value = value.derive;
    return (0);
-- 
Given these, we're finding the plugin works very well.
        Graham
-- 
------------------------------------------------------------------------
*Graham Breed*
Software Developer
ApplianSys Limited
University of Warwick Science Park
Business Innovation Centre
Harry Weston Road
Coventry CV3 2TX
<http://www.appliansys.com/>
*Our sales team sells by referral:*
Less time looking for customers, more time looking after them
Company registered in England & Wales #07608382 at
Business Innovation Centre, Harry Weston Road, Coventry CV3 2TX
    
    
More information about the collectd
mailing list