ceph plugin: Rewrite parse_keys() and compact_ds_name().
[collectd.git] / src / snmp.c
index 33a76e3..3d66041 100644 (file)
@@ -656,7 +656,10 @@ static int csnmp_config_add_host (oconfig_item_t *ci)
 
   status = cf_util_get_string(ci, &hd->name);
   if (status != 0)
+  {
+    sfree (hd);
     return status;
+  }
 
   hd->sess_handle = NULL;
   hd->interval = 0;