diff mbox series

[OpenWrt-Devel,ubus,11/16] lua: ubus_lua_do_subscribe: fix copy&paste error

Message ID 20191219221125.22646-12-ynezz@true.cz
State Accepted
Delegated to: Petr Štetiar
Headers show
Series GitLab CI, tests, fuzzing, fixes and improvements | expand

Commit Message

Petr Štetiar Dec. 19, 2019, 10:11 p.m. UTC
Fix copy&paste error in Lua ubus subscriber removal callback.

Addresses-Coverity-ID: 1412311 ("Copy-paste error")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
---
 lua/ubus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/lua/ubus.c b/lua/ubus.c
index fb50418d27b0..86dcc5007b3a 100644
--- a/lua/ubus.c
+++ b/lua/ubus.c
@@ -840,8 +840,8 @@  ubus_lua_do_subscribe( struct ubus_context *ctx, lua_State *L, const char* targe
 
 	if( idxremove ){
 		lua_getglobal(L, "__ubus_cb_subscribe");
-		lua_pushvalue(L, idxnotify);
-		sub->rnotify = luaL_ref(L, -2);
+		lua_pushvalue(L, idxremove);
+		sub->rremove = luaL_ref(L, -2);
 		lua_pop(L, 1);
 		sub->s.remove_cb = ubus_sub_remove_handler;
 	}