From a15a9c2c7104c3ea1dbc91c1c6931f3140a6b0a2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Feb 2008 08:25:18 +0100 Subject: [PATCH] fix a small memleak --- history.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/history.c b/history.c index dcf94e0..202d787 100644 --- a/history.c +++ b/history.c @@ -275,13 +275,13 @@ int uci_revert(struct uci_context *ctx, struct uci_package **pkg, char *section, UCI_INTERNAL(uci_load, ctx, name, &p); UCI_TRAP_RESTORE(ctx); + ctx->errno = 0; - goto done; error: if (name) free(name); - UCI_THROW(ctx, ctx->errno); -done: + if (ctx->errno) + UCI_THROW(ctx, ctx->errno); return 0; } -- 2.11.0