about summary refs log tree commit diff
path: root/nis/nis_findserv.c
diff options
context:
space:
mode:
Diffstat (limited to 'nis/nis_findserv.c')
-rw-r--r--nis/nis_findserv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nis/nis_findserv.c b/nis/nis_findserv.c
index 77f3c7c3ce..8e01164e3d 100644
--- a/nis/nis_findserv.c
+++ b/nis/nis_findserv.c
@@ -142,7 +142,7 @@ __nis_findfastest_with_timeout (dir_binding *bind,
     }
 
   /* Create RPC handle */
-  sock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
+  sock = socket (AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
   clnt = clntudp_create (&saved_sin, NIS_PROG, NIS_VERSION, *timeout, &sock);
   if (clnt == NULL)
     {