diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-19 12:08:48 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-09-19 12:08:48 +0100 |
commit | 19424515ec8b3dcb133cef30bf10f8c6b19cc3aa (patch) | |
tree | f38a63933f8164f0a39a60cf04f628d5eef52fcb /src/lua/lua_config.c | |
parent | b5a184a0f8b376f3917f103b637a3db17925d2ae (diff) | |
download | rspamd-19424515ec8b3dcb133cef30bf10f8c6b19cc3aa.tar.gz rspamd-19424515ec8b3dcb133cef30bf10f8c6b19cc3aa.zip |
[Minor] Fix some leaks on error paths
Found by: coverity scan
Diffstat (limited to 'src/lua/lua_config.c')
-rw-r--r-- | src/lua/lua_config.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index bfacb2be8..8b0a4a46c 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1614,9 +1614,9 @@ rspamd_register_symbol_fromlua (lua_State *L, rspamd_symcache_set_allowed_settings_ids (cfg->cache, name, ids, nids); - - g_free (ids); } + + g_free (ids); } if (forbidden_ids) { @@ -1636,9 +1636,9 @@ rspamd_register_symbol_fromlua (lua_State *L, rspamd_symcache_set_forbidden_settings_ids (cfg->cache, name, ids, nids); - - g_free (ids); } + + g_free (ids); } return ret; @@ -4417,9 +4417,10 @@ lua_config_init_subsystem (lua_State *L) rspamd_symcache_init (cfg->cache); } else { + int ret = luaL_error (L, "invalid param: %s", parts[i]); g_strfreev (parts); - return luaL_error (L, "invalid param: %s", parts[i]); + return ret; } } |