diff options
author | John Kohl <jtkohl@mit.edu> | 1990-04-19 15:22:50 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1990-04-19 15:22:50 +0000 |
commit | 305d1c0bbae9356ca9f54ef580100e7a02eb7c21 (patch) | |
tree | f2d6b326d4cf9aed36494daa9e100df80c86748e /src/lib | |
parent | 14f465f816db485afe0ba7a8ea1eaeb9879fc369 (diff) | |
download | krb5-305d1c0bbae9356ca9f54ef580100e7a02eb7c21.tar.gz krb5-305d1c0bbae9356ca9f54ef580100e7a02eb7c21.tar.xz krb5-305d1c0bbae9356ca9f54ef580100e7a02eb7c21.zip |
missing extra parens around recvfrom.
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
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/krb5/os/sendto_kdc.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/krb5/os/sendto_kdc.c b/src/lib/krb5/os/sendto_kdc.c index acc17c542..f38ec3183 100644 --- a/src/lib/krb5/os/sendto_kdc.c +++ b/src/lib/krb5/os/sendto_kdc.c @@ -123,12 +123,12 @@ OLDDECLARG(krb5_data *, reply) &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)) { @@ -159,7 +159,8 @@ OLDDECLARG(krb5_data *, reply) 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); |