diff options
author | jasone <jasone@FreeBSD.org> | 2000-07-21 04:22:39 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-07-21 04:22:39 +0000 |
commit | 6e408fc8c91301b28474ee57af3e3e0914ef9225 (patch) | |
tree | 7771c00565bc1bd3891e1fcd3ae054bfd4dc04dc /lib/libc/net/getaddrinfo.c | |
parent | 6ab9a2d5e85b511aff7a4301874d13678cfd81ed (diff) | |
download | FreeBSD-src-6e408fc8c91301b28474ee57af3e3e0914ef9225.zip FreeBSD-src-6e408fc8c91301b28474ee57af3e3e0914ef9225.tar.gz |
Use _close() instead of close() in addrconfig() to keep it from becoming a
potential cancellation point in libc_r.
Diffstat (limited to 'lib/libc/net/getaddrinfo.c')
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index f44a14d..6d23544 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1146,18 +1146,18 @@ addrconfig(pai) if ((s = socket(AF_INET6, SOCK_DGRAM, 0)) < 0) af = AF_INET; else { - close(s); + _close(s); if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) af = AF_INET6; else - close(s); + _close(s); } } if (af != AF_UNSPEC) { if ((s = socket(af, SOCK_DGRAM, 0)) < 0) return 0; - close(s); + _close(s); } pai->ai_family = af; return 1; |