close the sockets, not the index to the sockets, and only
do the active sockets.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@518
dc483132-0cff-0310-8789-
dd5450dbe970
&waitlen)) {
if (nready == -1)
continue; /* XXX */
- if (cc = recvfrom(socklist[addr[host].sa_family],
- reply->data,
- reply->length,
- 0,
- &fromaddr,
- &fromlen) == -1)
+ if ((cc = recvfrom(socklist[addr[host].sa_family],
+ reply->data,
+ reply->length,
+ 0,
+ &fromaddr,
+ &fromlen)) == -1)
continue; /* XXX */
if (bcmp((char *)&fromaddr, (char *)&addr[host],
fromlen)) {
retval = KRB5_KDC_UNREACH;
out:
for (i = 0; i < AF_MAX; i++)
- (void) close(i);
+ if (socklist[i] != -1)
+ (void) close(socklist[i]);
free((char *)addr);
if (retval) {
free(reply->data);