summaryrefslogtreecommitdiffstats
path: root/src/libutil/addr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r--src/libutil/addr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index e24432cfa..19eda5a13 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -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;
}