From: John Kohl Date: Fri, 31 Aug 1990 15:43:02 +0000 (+0000) Subject: need to save errno in case close fails X-Git-Tag: krb5-1.0-alpha2~337 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c74cfb13f17d3b227974a34816f11057ac9d2d17;p=krb5.git need to save errno in case close fails git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1074 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/localaddr.c b/src/lib/krb5/os/localaddr.c index 68bc749f9..d5fe6ee6c 100644 --- a/src/lib/krb5/os/localaddr.c +++ b/src/lib/krb5/os/localaddr.c @@ -97,8 +97,9 @@ krb5_error_code krb5_os_localaddr(addr) code = ioctl (s, SIOCGIFCONF, (char *)&ifc); if (code < 0) { + int retval = errno; close(s); - return errno; + return retval; } n = ifc.ifc_len / sizeof (struct ifreq);