projects
/
project
/
uci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix a small memleak
[project/uci.git]
/
history.c
diff --git
a/history.c
b/history.c
index
dcf94e0
..
202d787
100644
(file)
--- 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;
}