summaryrefslogtreecommitdiff
path: root/lib/libc/rpc/pmap_getmaps.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-10 07:46:44 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-12-10 07:46:44 +0000
commit0de13dae2234e314b5c890da4f2d99c3dca29182 (patch)
tree847aca1e828698cedf65411731e107f2893f6d7f /lib/libc/rpc/pmap_getmaps.c
parent4a24468ccf5c7f1ade97c67ece7cad2e265b6b74 (diff)
avoid close(-1) cases
Diffstat (limited to 'lib/libc/rpc/pmap_getmaps.c')
-rw-r--r--lib/libc/rpc/pmap_getmaps.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/rpc/pmap_getmaps.c b/lib/libc/rpc/pmap_getmaps.c
index be6cd8fc466..b7a822bc336 100644
--- a/lib/libc/rpc/pmap_getmaps.c
+++ b/lib/libc/rpc/pmap_getmaps.c
@@ -28,7 +28,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.3 1996/08/19 08:31:37 tholo Exp $";
+static char *rcsid = "$OpenBSD: pmap_getmaps.c,v 1.4 1996/12/10 07:46:39 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -76,7 +76,8 @@ pmap_getmaps(address)
}
CLNT_DESTROY(client);
}
- (void)close(socket);
+ if (socket != -1)
+ (void)close(socket);
address->sin_port = 0;
return (head);
}