]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix crash when resolver is undefined
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 11 Mar 2017 12:27:12 +0000 (12:27 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 11 Mar 2017 12:27:12 +0000 (12:27 +0000)
src/libutil/addr.c

index 463706aea3c01e6c87004a40a712c818620e74fb..c70946c09d1f46cebb94e5095ebbb7bfe2739779 100644 (file)
@@ -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;
                }