summaryrefslogtreecommitdiff
path: root/socket.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2011-07-11 18:15:51 -0700
committerWayne Davison <wayned@samba.org>2011-07-11 18:15:51 -0700
commitfbf4c261f4f71042da71c91acd0c26c48c697085 (patch)
tree4492ea4ed4e0afbd4aa90fcc71937f5e271192eb /socket.c
parent425747c2f371d8ec071ac3003c5d72c04185733c (diff)
downloadrsync-fbf4c261f4f71042da71c91acd0c26c48c697085.tar.gz
rsync-fbf4c261f4f71042da71c91acd0c26c48c697085.tar.bz2
rsync-fbf4c261f4f71042da71c91acd0c26c48c697085.zip
Move freeaddrinfo() call after failure-reporting loop.
Diffstat (limited to 'socket.c')
-rw-r--r--socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/socket.c b/socket.c
index c19412d2..86e62f9d 100644
--- a/socket.c
+++ b/socket.c
@@ -299,7 +299,6 @@ int open_socket_out(char *host, int port, const char *bind_addr,
}
break;
}
- freeaddrinfo(res0);
if (s < 0) {
char buf[2048];
@@ -313,6 +312,7 @@ int open_socket_out(char *host, int port, const char *bind_addr,
s = -1;
}
+ freeaddrinfo(res0);
free(errnos);
return s;