src/configfile.c: Fix a minor memory leak.
[collectd.git] / src / configfile.c
index 4a9789a..8b526f2 100644 (file)
@@ -328,7 +328,7 @@ static int dispatch_block_plugin (oconfig_item_t *ci)
                if (ci->children[i].children == NULL)
                        dispatch_value_plugin (name, ci->children + i);
                else
-                       {DEBUG ("No nested config blocks allow for this plugin.");}
+                       {DEBUG ("No nested config blocks allowed for this plugin.");}
        }
 
        return (0);
@@ -888,7 +888,11 @@ int cf_read (char *filename)
                        dispatch_block (conf->children + i);
        }
 
+       oconfig_free (conf);
+
+       /* Read the default types.db if no `TypesDB' option was given. */
        if (cf_default_typesdb)
-               read_types_list (PLUGINDIR"/types.db"); /* FIXME: Configure path */
+               read_types_list (PLUGINDIR"/types.db");
+
        return (0);
 } /* int cf_read */