From 3365f4ed9beb042fce3d397f1cd2ff72328e4c92 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 11 Mar 2017 12:27:12 +0000 Subject: [PATCH] [Fix] Fix crash when resolver is undefined --- src/libutil/addr.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libutil/addr.c b/src/libutil/addr.c index 463706aea..c70946c09 100644 --- a/src/libutil/addr.c +++ b/src/libutil/addr.c @@ -1232,7 +1232,10 @@ rspamd_resolve_addrs (const char *begin, size_t len, GPtrArray **addrs, msg_err_pool_check ("address resolution for %s failed: %s", addr_cpy, gai_strerror (r)); - g_free (addr_cpy); + + if (pool == NULL) { + g_free (addr_cpy); + } return FALSE; } -- 2.39.5