summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net.c b/net.c
index ac304b4..255f435 100644
--- a/net.c
+++ b/net.c
@@ -435,9 +435,7 @@ addrretry:
}
/* For repeat connection */
- if (c->saddr) {
- free(c->saddr);
- }
+ free(c->saddr);
c->saddr = malloc(p->ai_addrlen);
memcpy(c->saddr, p->ai_addr, p->ai_addrlen);
c->addrlen = p->ai_addrlen;