]> source.dussan.org Git - rspamd.git/commitdiff
Fix setting pointer.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 12 Mar 2015 16:56:59 +0000 (16:56 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 12 Mar 2015 16:56:59 +0000 (16:56 +0000)
src/libutil/addr.c

index e24432cfa2dcb60e1d13fea8271bb94d8376191f..19eda5a1318c8bebfe77e9ca98f275f0a1482b64 100644 (file)
@@ -338,7 +338,7 @@ gboolean
 rspamd_parse_inet_address (rspamd_inet_addr_t **target, const char *src)
 {
        gboolean ret = FALSE;
-       rspamd_inet_addr_t *addr;
+       rspamd_inet_addr_t *addr = NULL;
        union sa_inet su;
 
        g_assert (src != NULL);
@@ -363,6 +363,10 @@ rspamd_parse_inet_address (rspamd_inet_addr_t **target, const char *src)
                ret = TRUE;
        }
 
+       if (ret && target) {
+               *target = addr;
+       }
+
        return ret;
 }