X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=blobdiff_plain;f=libuci.c;h=1cfe4ec87e6cd2aafe79f0e95f7c4c033d878dfd;hp=5b5db54718a5bb6dc20fc52ade8404397aa6a9f3;hb=a5256582f5a554c0cbcf45d19bb751e60ea42ce9;hpb=51b60a322aff3fd1045fb6c9eb289ade2de54e71 diff --git a/libuci.c b/libuci.c index 5b5db54..1cfe4ec 100644 --- a/libuci.c +++ b/libuci.c @@ -56,7 +56,7 @@ struct uci_context *uci_alloc_context(void) uci_list_init(&ctx->root); uci_list_init(&ctx->history_path); uci_list_init(&ctx->backends); - ctx->flags = UCI_FLAG_STRICT; + ctx->flags = UCI_FLAG_STRICT | UCI_FLAG_SAVED_HISTORY; ctx->confdir = (char *) uci_confdir; ctx->savedir = (char *) uci_savedir; @@ -85,8 +85,8 @@ void uci_free_context(struct uci_context *ctx) uci_foreach_element_safe(&ctx->history_path, tmp, e) { uci_free_element(e); } - free(ctx); UCI_TRAP_RESTORE(ctx); + free(ctx); ignore: return;