From 6690a9d92a486677f79c4fb8010a0a8462d6a332 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 9 Dec 1997 20:01:39 +0000 Subject: no, this is better --- kerberosIV/krb/getaddrs.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'kerberosIV/krb') 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; } -- cgit v1.2.3