diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-09 20:01:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-12-09 20:01:39 +0000 |
commit | 6690a9d92a486677f79c4fb8010a0a8462d6a332 (patch) | |
tree | c31fb3c40ed39054a6df5c1ed8b253447ffdab5e | |
parent | bb84c116891bd569513da80bc63f68f5a7ec090b (diff) |
no, this is better
-rw-r--r-- | kerberosIV/krb/getaddrs.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/kerberosIV/krb/getaddrs.c b/kerberosIV/krb/getaddrs.c index ed1bfb410c6..212fd02aed1 100644 --- a/kerberosIV/krb/getaddrs.c +++ b/kerberosIV/krb/getaddrs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrs.c,v 1.4 1997/12/09 14:43:58 art Exp $ */ +/* $OpenBSD: getaddrs.c,v 1.5 1997/12/09 20:01:38 deraadt Exp $ */ /* $KTH: getaddrs.c,v 1.20 1997/11/09 06:13:32 assar Exp $ */ /* @@ -83,7 +83,6 @@ k_get_all_addrs (struct in_addr **l) if (ioctl(fd, SIOCGIFCONF, &ifconf) < 0) { close(fd); free(inbuf); - inbuf = NULL; return -1; } if (ifconf.ifc_len + sizeof(ifreq) < len) @@ -96,7 +95,6 @@ k_get_all_addrs (struct in_addr **l) if(*l == NULL) { close(fd); free(inbuf); - inbuf = NULL; return -1; } @@ -113,7 +111,6 @@ k_get_all_addrs (struct in_addr **l) free(*l); *l = NULL; free(inbuf); - inbuf = NULL; return -1; } if (ifr->ifr_flags & IFF_UP) { @@ -122,7 +119,6 @@ k_get_all_addrs (struct in_addr **l) free(*l); *l = NULL; free(inbuf); - inbuf = NULL; return -1; } (*l)[j++] = ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr; @@ -134,12 +130,12 @@ k_get_all_addrs (struct in_addr **l) if (j != num) if ((*l = realloc (*l, j * sizeof(struct in_addr))) == NULL) { - free(inbuf); - inbuf = NULL; close(fd); + free(inbuf); return -1; } + free(inbuf); close(fd); return j; } |