]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix double frees in some places
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 May 2018 11:41:05 +0000 (12:41 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 25 May 2018 11:41:05 +0000 (12:41 +0100)
src/rspamadm/control.c
src/rspamadm/corpus_test.c
src/rspamadm/fuzzy_convert.c
src/rspamadm/grep.c
src/rspamadm/lua_repl.c
src/rspamadm/rspamadm.c
src/rspamadm/stat_convert.c

index 35b5415e7aa2a7335b1c349aedea1a6d74d824c5..4d7806b84abad9ba20360eab3bf8c23590d0821a 100644 (file)
@@ -262,6 +262,5 @@ rspamadm_control (gint argc, gchar **argv, const struct rspamadm_command *_cmd)
 
        rspamd_http_connection_unref (conn);
        rspamd_inet_address_free (addr);
-       lua_close (L);
        close (sock);
 }
index 305c3a8adc16adb69e74a2475e939c87a13937ec..abf7135b739808ba7c0b478a4e75012fa915d207 100644 (file)
@@ -122,6 +122,5 @@ rspamadm_corpus_test (gint argc, gchar **argv, const struct rspamadm_command *cm
                        obj,
                        "corpus_test");
 
-       lua_close (L);
        ucl_object_unref (obj);
 }
index ebf60bd248908e036515bedbefb17312a11f7507..7671678dcc6f2fac9633eb7d8e381a37f55d9d55 100644 (file)
@@ -137,6 +137,5 @@ rspamadm_fuzzyconvert (gint argc, gchar **argv, const struct rspamadm_command *c
                        obj,
                        "fuzzy_convert");
 
-       lua_close (L);
        ucl_object_unref (obj);
 }
index 60189f39c4227c74e33e504306122cad4e5abde0..08ea1c40bdfbcd061277f2aced9693bd9ddbea8a 100644 (file)
@@ -153,6 +153,5 @@ rspamadm_grep (gint argc, gchar **argv, const struct rspamadm_command *cmd)
                        obj,
                        "grep");
 
-       lua_close (L);
        ucl_object_unref (obj);
 }
index 4ec934b912b4b3128c8bd8b025fde7f46bdc67f6..e2f3a858129a1846c1124d697adc1f930e38a78a 100644 (file)
@@ -666,7 +666,6 @@ rspamadm_lua (gint argc, gchar **argv, const struct rspamadm_command *cmd)
        GError *error = NULL;
        gchar **elt;
        guint i;
-       lua_State *L;
 
        context = g_option_context_new ("lua - run lua interpreter");
        g_option_context_set_summary (context,
index 0ec4ba40355ab16b032449b8ad39711ed181f329..e20f9ee83177f0a0d792e888bedb042931572e47 100644 (file)
@@ -407,7 +407,6 @@ main (gint argc, gchar **argv, gchar **env)
 
        rspamd_log_close (rspamd_main->logger);
        REF_RELEASE (rspamd_main->cfg);
-       lua_close (L);
        g_free (rspamd_main);
        g_ptr_array_free (all_commands, TRUE);
 
index 68723c40f721037608259678b5811589a52b0172..ef17194b0fb7bac05f72aa8aa6a58a4ef4ebef82 100644 (file)
@@ -253,6 +253,5 @@ rspamadm_statconvert (gint argc, gchar **argv, const struct rspamadm_command *cm
                        obj,
                        "stat_convert");
 
-       lua_close (L);
        ucl_object_unref (obj);
 }