From e61b8a91ed7c21e01ff40006837d319eaeef24ab Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Sun, 14 Aug 2016 15:08:40 +0200 Subject: [PATCH] Lua plugin: Terminate array with sentinel From the API docs: Any array of luaL_Reg must end with a sentinel entry in which both name and func are NULL. --- src/lua.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lua.c b/src/lua.c index 79f288be..3b8b3da0 100644 --- a/src/lua.c +++ b/src/lua.c @@ -370,7 +370,9 @@ static luaL_Reg collectdlib[] = { {"log_warning", lua_cb_log_warning}, {"dispatch_values", lua_cb_dispatch_values}, {"register_read", lua_cb_register_read}, - {"register_write", lua_cb_register_write}}; + {"register_write", lua_cb_register_write}, + {NULL, NULL} +}; static int open_collectd(lua_State *L) /* {{{ */ { -- 2.11.0