From 7400ce1d911298262dd067d4023c9ed10e69aa5f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 25 Feb 2015 11:52:02 +0000 Subject: [PATCH] Remove forgotten variables in lua stack. Conflicts: src/lua/lua_common.c --- src/lua/lua_common.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index 1c8e97afb0..62fbc1ec53 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -292,6 +292,12 @@ rspamd_lua_set_path (lua_State *L, struct rspamd_config *cfg) lua_getfield (L, -1, "path"); old_path = luaL_checkstring (L, -1); + if (strstr (old_path, RSPAMD_PLUGINSDIR) != NULL) { + /* Path has been already set, do not touch it */ + lua_pop (L, 2); + return; + } + opts = ucl_object_find_key (cfg->rcl_obj, "options"); if (opts != NULL) { opts = ucl_object_find_key (opts, "lua_path"); -- 2.47.3