summaryrefslogtreecommitdiff
path: root/net.c
diff options
context:
space:
mode:
Diffstat (limited to 'net.c')
-rw-r--r--net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net.c b/net.c
index 62c6ca0..7d5588e 100644
--- a/net.c
+++ b/net.c
@@ -402,7 +402,7 @@ addrretry:
if (c->saddr) {
free(c->saddr);
}
- c->saddr = malloc(sizeof(*p->ai_addr));
+ c->saddr = malloc(p->ai_addrlen);
memcpy(c->saddr, p->ai_addr, p->ai_addrlen);
c->addrlen = p->ai_addrlen;