}
#include "list.c"
-#include "parse.c"
+#include "file.c"
/* externally visible functions */
return ctx;
}
+void uci_free(struct uci_context *ctx)
+{
+ struct uci_config *cfg;
+
+ uci_cleanup(ctx);
+ uci_foreach_entry(config, &ctx->root, cfg) {
+ uci_drop_config(cfg);
+ }
+ free(ctx);
+ return;
+}
+
int uci_cleanup(struct uci_context *ctx)
{
UCI_HANDLE_ERR(ctx);
- uci_parse_cleanup(ctx);
+ uci_file_cleanup(ctx);
return 0;
}