diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 16:56:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-03-12 16:56:59 +0000 |
commit | 6ff3d38dfa3dd3a02b0a33af2ad90cf3961ba3b7 (patch) | |
tree | 305e7782edb60fd2478c079a47077142c9c140fb /src/libutil/addr.c | |
parent | 8426999b1689e40e147af9cbdfdc41ac9e60c7c1 (diff) | |
download | rspamd-6ff3d38dfa3dd3a02b0a33af2ad90cf3961ba3b7.tar.gz rspamd-6ff3d38dfa3dd3a02b0a33af2ad90cf3961ba3b7.zip |
Fix setting pointer.
Diffstat (limited to 'src/libutil/addr.c')
-rw-r--r-- | src/libutil/addr.c | 6 |
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; } |