diff options
author | Quentin Young <qlyoung@qlyoung.net> | 2019-07-03 21:35:54 +0000 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-07-03 21:36:48 +0000 |
commit | 83d3c097efcc724177fae7b5f8c8daefd95e9a32 (patch) | |
tree | 0e0c1202a6554cf06674c5a74bcaf7b693a92afc | |
parent | f5f855c91239706b173e2412cea301f4a3643e2d (diff) |
Remove unnecessary null check before free
-rw-r--r-- | net.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -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; |