summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-27 16:45:56 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-08-27 16:45:56 +0200
commita5256582f5a554c0cbcf45d19bb751e60ea42ce9 (patch)
tree1ce8796f1538ed86c08c5a9e261f6bde5b7221e1
parent289e14f9fa5472589b85bdae102aece71d858ecd (diff)
downloaduci-a5256582f5a554c0cbcf45d19bb751e60ea42ce9.tar.gz
fix sanity checks for uci.set to be able to create new sections
-rw-r--r--lua/uci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/uci.c b/lua/uci.c
index 7f4ba99..5891562 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -440,7 +440,7 @@ uci_lua_set(lua_State *L)
if (err)
goto error;
- if ((ptr.s == NULL) || (ptr.value == NULL)) {
+ if (((ptr.s == NULL) && (ptr.option != NULL)) || (ptr.value == NULL)) {
err = UCI_ERR_INVAL;
goto error;
}