diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-11 12:27:12 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2017-03-11 12:27:12 +0000 |
commit | 3365f4ed9beb042fce3d397f1cd2ff72328e4c92 (patch) | |
tree | 56004dd4d390317f3f5f509d935e4cb828264675 /src | |
parent | f9eb3b97eb2a308685aac5d5e538e1cc85c3c839 (diff) | |
download | rspamd-3365f4ed9beb042fce3d397f1cd2ff72328e4c92.tar.gz rspamd-3365f4ed9beb042fce3d397f1cd2ff72328e4c92.zip |
[Fix] Fix crash when resolver is undefined
Diffstat (limited to 'src')
-rw-r--r-- | src/libutil/addr.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |