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