diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 17:42:29 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-01-18 17:42:29 +0000 |
commit | 87be736a89369f4c746e5a97352000eceaabac3a (patch) | |
tree | 80ecff5c1e2d79cc0a49032520537c0ba292b2fa /src/lua/lua_map.c | |
parent | 9d090bfa97a3de12fbc6123def434609349b9031 (diff) | |
download | rspamd-87be736a89369f4c746e5a97352000eceaabac3a.tar.gz rspamd-87be736a89369f4c746e5a97352000eceaabac3a.zip |
[Fix] More leaks eliminated
Diffstat (limited to 'src/lua/lua_map.c')
-rw-r--r-- | src/lua/lua_map.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lua/lua_map.c b/src/lua/lua_map.c index 0b271affe..c74bcf31b 100644 --- a/src/lua/lua_map.c +++ b/src/lua/lua_map.c @@ -381,6 +381,9 @@ lua_config_add_map (lua_State *L) &map_obj, &description, &cbidx, &type)) { ret = luaL_error (L, "invalid table arguments: %s", err->message); g_error_free (err); + if (map_obj) { + ucl_object_unref (map_obj); + } return ret; } @@ -410,6 +413,10 @@ lua_config_add_map (lua_State *L) luaL_unref (L, LUA_REGISTRYINDEX, cbidx); } + if (map_obj) { + ucl_object_unref (map_obj); + } + lua_pushnil (L); return 1; |