Commit 83d3c097 authored by Quentin Young's avatar Quentin Young Committed by Quentin Young
Browse files

Remove unnecessary null check before free

parent f5f855c9
...@@ -435,9 +435,7 @@ addrretry: ...@@ -435,9 +435,7 @@ addrretry:
} }
/* For repeat connection */ /* For repeat connection */
if (c->saddr) {
free(c->saddr); free(c->saddr);
}
c->saddr = malloc(p->ai_addrlen); c->saddr = malloc(p->ai_addrlen);
memcpy(c->saddr, p->ai_addr, p->ai_addrlen); memcpy(c->saddr, p->ai_addr, p->ai_addrlen);
c->addrlen = p->ai_addrlen; c->addrlen = p->ai_addrlen;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment