uci: reset uci_ptr flags when merging options during section add
authorJo-Philipp Wich <jo@mein.io>
Tue, 26 May 2020 13:49:18 +0000 (15:49 +0200)
committerJo-Philipp Wich <jo@mein.io>
Tue, 26 May 2020 14:00:34 +0000 (16:00 +0200)
Fixes: FS#3126
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
uci.c

diff --git a/uci.c b/uci.c
index 522c24e8d569bf92aa8e1cf65d91d7c972135183..327b17fcec6d80bc152bdfc1f7bc06925a0c22af 100644 (file)
--- a/uci.c
+++ b/uci.c
@@ -734,6 +734,7 @@ rpc_uci_add(struct ubus_context *ctx, struct ubus_object *obj,
        {
                blobmsg_for_each_attr(cur, tb[RPC_A_VALUES], rem)
                {
+                       ptr.flags = 0;
                        ptr.o = NULL;
                        ptr.option = blobmsg_name(cur);