From: Vsevolod Stakhov Date: Wed, 25 Feb 2015 11:52:02 +0000 (+0000) Subject: Remove forgotten variables in lua stack. X-Git-Tag: 0.8.2~23^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7400ce1d911298262dd067d4023c9ed10e69aa5f;p=thirdparty%2Frspamd.git Remove forgotten variables in lua stack. Conflicts: src/lua/lua_common.c --- 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");