Code

ethstat plugin: Initialize realloc'ated memory.
[collectd.git] / src / ethstat.c
index 746fc613d0d332a883d947c0029c5640d6e006b4..08381a821087e275fb03922a32bc54c35ca7c3cd 100644 (file)
@@ -66,6 +66,7 @@ static int ethstat_add_interface (const oconfig_item_t *ci) /* {{{ */
   if (tmp == NULL)
     return (-1);
   interfaces = tmp;
+  interfaces[interfaces_num] = NULL;
 
   status = cf_util_get_string (ci, interfaces + interfaces_num);
   if (status != 0)