From: Felix Fietkau Date: Wed, 27 Aug 2008 14:45:56 +0000 (+0200) Subject: fix sanity checks for uci.set to be able to create new sections X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=a5256582f5a554c0cbcf45d19bb751e60ea42ce9;p=uci.git fix sanity checks for uci.set to be able to create new sections --- 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; }