summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-18 21:48:57 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-08-18 21:48:57 +0200
commita7b730e73b1714c7522283924174340877228748 (patch)
treeab7a7d5340d012b37f7924ea7f876833e5acf787
parent672d68a8765c242dd939a31b520acbe1c9c1d7c2 (diff)
downloaduci-a7b730e73b1714c7522283924174340877228748.tar.gz
fix use-after-free
-rw-r--r--libuci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libuci.c b/libuci.c
index 5872ae4..1cfe4ec 100644
--- a/libuci.c
+++ b/libuci.c
@@ -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;