diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 14:59:04 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-20 14:59:06 +0100 |
commit | 8bb34756ce2bd684745d3a49a134dae03073b452 (patch) | |
tree | b1bb25324b479b1a0a819b4c34235ccd82bc6b5d | |
parent | 1d2b3bbdbefa4901e34506f86f4b4c4412dbb555 (diff) | |
download | ubus-8bb34756ce2bd684745d3a49a134dae03073b452.tar.gz |
lua: fix stack leak in ubus method handling
Signed-off-by: Chen Bin <ewolfok@126.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
-rw-r--r-- | lua/ubus.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -302,8 +302,9 @@ ubus_method_handler(struct ubus_context *ctx, struct ubus_object *obj, lua_call(state, 2, 1); if (lua_isnumber(state, -1)) rv = lua_tonumber(state, -1); - } else - lua_pop(state, 1); + } + + lua_pop(state, 1); return rv; } |