diff options
author | Mark Nunberg <mnunberg@users.noreply.github.com> | 2019-08-09 03:40:32 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-09 03:40:32 -0400 |
commit | fbb83c4a7a290d6ff912a6e77dd2ad6dfac357af (patch) | |
tree | a738a1c2fa48cd454cff6cdee9b257260c58e9e1 | |
parent | 9414207002771d2caea82f2711e19ae4f541f155 (diff) | |
parent | 83d3c097efcc724177fae7b5f8c8daefd95e9a32 (diff) |
Merge pull request #684 from qlyoung/remove-unnecessary-nullcheck
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; |