aboutsummaryrefslogtreecommitdiff
path: root/eBones/lib/libkrb/send_to_kdc.c
diff options
context:
space:
mode:
authorJustin T. Gibbs <gibbs@FreeBSD.org>1995-01-25 06:37:33 +0000
committerJustin T. Gibbs <gibbs@FreeBSD.org>1995-01-25 06:37:33 +0000
commit8d4b2d911cf3a819bf50430075b74eacba7699ac (patch)
treec26954c76563a74a5c7143311a4d3e8ace69ee20 /eBones/lib/libkrb/send_to_kdc.c
parenteef7796c268a0a89c3ea8780f036935773347023 (diff)
Notes
Diffstat (limited to 'eBones/lib/libkrb/send_to_kdc.c')
-rw-r--r--eBones/lib/libkrb/send_to_kdc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/eBones/lib/libkrb/send_to_kdc.c b/eBones/lib/libkrb/send_to_kdc.c
index 15e4220fa2f2..59349c78b536 100644
--- a/eBones/lib/libkrb/send_to_kdc.c
+++ b/eBones/lib/libkrb/send_to_kdc.c
@@ -4,7 +4,7 @@
* <Copyright.MIT>.
*
* from: send_to_kdc.c,v 4.20 90/01/02 13:40:37 jtkohl Exp $
- * $Id: send_to_kdc.c,v 1.1.1.1 1994/09/30 14:50:03 csgr Exp $
+ * $Id: send_to_kdc.c,v 1.2 1995/01/25 05:40:00 gibbs Exp $
*/
#ifndef lint
@@ -121,7 +121,6 @@ send_to_kdc(pkt,rpkt,realm)
hostlist = (struct hostent *) malloc(sizeof(struct hostent));
if (!hostlist)
return (/*errno */SKDC_CANT);
- bzero(hostlist, sizeof(struct hostent));
if ((f = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
if (krb_debug)
fprintf(stderr,"%s: Can't open socket\n", prog);
@@ -214,17 +213,19 @@ send_to_kdc(pkt,rpkt,realm)
rtn:
(void) close(f);
if (hostlist) {
- register struct hostent *hp;
- for (hp = hostlist; hp->h_name; hp++)
+ if(!no_host) {
+ register struct hostent *hp;
+ for (hp = hostlist; hp->h_name; hp++)
#if !(defined(ULTRIX022) || (defined(SunOS) && SunOS < 40))
- if (hp->h_addr_list) {
+ if (hp->h_addr_list) {
#endif /* ULTRIX022 || SunOS */
- if (hp->h_addr)
- free(hp->h_addr);
+ if (hp->h_addr)
+ free(hp->h_addr);
#if !(defined(ULTRIX022) || (defined(SunOS) && SunOS < 40))
- free((char *)hp->h_addr_list);
- }
+ free((char *)hp->h_addr_list);
+ }
#endif /* ULTRIX022 || SunOS */
+ }
free((char *)hostlist);
}
return(retval);