From 2a3ffb0a3f38d814ae3b9cb7e7fa868218b45423 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Feb 2008 12:22:02 +0100 Subject: [PATCH] improve error handling --- file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/file.c b/file.c index 29ff318..d320ba6 100644 --- a/file.c +++ b/file.c @@ -122,7 +122,8 @@ static void uci_parse_config(struct uci_context *ctx, char **str) if (pctx->merge) { UCI_TRAP_SAVE(ctx, error); - uci_set(ctx, pctx->package, name, NULL, type, NULL); + if (uci_set(ctx, pctx->package, name, NULL, type, NULL) != UCI_OK) + goto error; UCI_TRAP_RESTORE(ctx); return; error: -- 2.11.0