Many build fixes that turned up with GCC 4.6.
[collectd.git] / src / match_value.c
index a3eeffd..ae6282c 100644 (file)
@@ -53,9 +53,18 @@ struct mv_match_s
  */
 static void mv_free_match (mv_match_t *m) /* {{{ */
 {
+  int i;
+  
   if (m == NULL)
     return;
 
+  if (m->data_sources != NULL)
+  {
+    for (i = 0; i < m->data_sources_num; ++i)
+      free(m->data_sources[i]);
+    free(m->data_sources);
+  }
+  
   free (m);
 } /* }}} void mv_free_match */
 
@@ -258,7 +267,7 @@ static int mv_destroy (void **user_data) /* {{{ */
 } /* }}} int mv_destroy */
 
 static int mv_match (const data_set_t *ds, const value_list_t *vl, /* {{{ */
-    notification_meta_t **meta, void **user_data)
+    notification_meta_t __attribute__((unused)) **meta, void **user_data)
 {
   mv_match_t *m;
   gauge_t *values;