diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-23 20:20:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-08-23 20:20:35 +0100 |
commit | 233a082b420a8b8bb41fe8a8017d91e48ade40e9 (patch) | |
tree | 9a2cdbc5a76db43589e5266df03479ae3161b268 | |
parent | 826c02dd8e560a3431b959aa0a31eb3850a46191 (diff) | |
download | rspamd-233a082b420a8b8bb41fe8a8017d91e48ade40e9.tar.gz rspamd-233a082b420a8b8bb41fe8a8017d91e48ade40e9.zip |
[Minor] Fix use after free
-rw-r--r-- | src/lua/lua_common.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lua/lua_common.c b/src/lua/lua_common.c index baab27226..2aed2f7a9 100644 --- a/src/lua/lua_common.c +++ b/src/lua/lua_common.c @@ -1490,8 +1490,6 @@ rspamd_lua_cld_handler (struct rspamd_worker_signal_handler *sigh, void *ud) g_string_free (cbdata->out_buf, TRUE); } - g_free (cbdata); - /* Notify main */ memset (&srv_cmd, 0, sizeof (srv_cmd)); srv_cmd.type = RSPAMD_SRV_ON_FORK; @@ -1500,6 +1498,7 @@ rspamd_lua_cld_handler (struct rspamd_worker_signal_handler *sigh, void *ud) srv_cmd.cmd.on_fork.ppid = getpid (); rspamd_srv_send_command (cbdata->wrk, cbdata->ev_base, &srv_cmd, -1, NULL, NULL); + g_free (cbdata); /* We are done with this SIGCHLD */ return FALSE; |