From: Vsevolod Stakhov Date: Tue, 6 Sep 2016 13:17:28 +0000 (+0100) Subject: [Minor] Fix use-after-free X-Git-Tag: 1.4.0~481 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5914c4fd04c2c35041d530625784a2f86675fa6b;p=thirdparty%2Frspamd.git [Minor] Fix use-after-free --- diff --git a/src/libutil/util.c b/src/libutil/util.c index 1ad4c6945d..889cc1c6c8 100644 --- a/src/libutil/util.c +++ b/src/libutil/util.c @@ -2143,7 +2143,6 @@ rspamd_deinit_libs (struct rspamd_external_libs_ctx *ctx) } g_free (ctx->ottery_cfg); - g_slice_free1 (sizeof (*ctx), ctx); g_mime_shutdown (); #ifdef HAVE_OPENSSL @@ -2152,6 +2151,7 @@ rspamd_deinit_libs (struct rspamd_external_libs_ctx *ctx) SSL_CTX_free (ctx->ssl_ctx); #endif rspamd_inet_library_destroy (); + g_slice_free1 (sizeof (*ctx), ctx); } }