diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-12-30 18:24:37 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2014-12-30 18:24:37 +0000 |
commit | 927a3f3d04567098ce64b73cef90473a9a993618 (patch) | |
tree | 5631704510aa1fe330715846969cb62d55c65f25 /src/libutil/upstream.c | |
parent | 50c2000786d45f91c26a6694a4f87c7b4554f0cd (diff) | |
download | rspamd-927a3f3d04567098ce64b73cef90473a9a993618.tar.gz rspamd-927a3f3d04567098ce64b73cef90473a9a993618.zip |
Zero memory for inet address.
Diffstat (limited to 'src/libutil/upstream.c')
-rw-r--r-- | src/libutil/upstream.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libutil/upstream.c b/src/libutil/upstream.c index d2c1d2ee0..bd7f84066 100644 --- a/src/libutil/upstream.c +++ b/src/libutil/upstream.c @@ -165,7 +165,7 @@ rspamd_upstream_dns_cb (struct rdns_reply *reply, void *arg) while (entry) { if (entry->type == RDNS_REQUEST_A) { - up_ent = g_malloc (sizeof (*up_ent)); + up_ent = g_malloc0 (sizeof (*up_ent)); up_ent->addr.addr.s4.sin_addr = entry->content.a.addr; up_ent->addr.af = AF_INET; @@ -174,7 +174,7 @@ rspamd_upstream_dns_cb (struct rdns_reply *reply, void *arg) LL_PREPEND (up->new_addrs, up_ent); } else if (entry->type == RDNS_REQUEST_AAAA) { - up_ent = g_malloc (sizeof (*up_ent)); + up_ent = g_malloc0 (sizeof (*up_ent)); memcpy (&up_ent->addr.addr.s6.sin6_addr, &entry->content.aaa.addr, sizeof (struct in6_addr)); |