Browse Source

fix use-after-free

Felix Fietkau 15 years ago
parent
commit
a7b730e73b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      libuci.c

+ 1 - 1
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;