diff options
-rw-r--r-- | lib/libc/rpc/pmap_getport.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libc/rpc/pmap_getport.c b/lib/libc/rpc/pmap_getport.c index dd63a37..0ddab7e 100644 --- a/lib/libc/rpc/pmap_getport.c +++ b/lib/libc/rpc/pmap_getport.c @@ -30,7 +30,7 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)pmap_getport.c 1.9 87/08/11 Copyr 1984 Sun Micro";*/ /*static char *sccsid = "from: @(#)pmap_getport.c 2.2 88/08/01 4.0 RPCSRC";*/ -static char *rcsid = "$Id: pmap_getport.c,v 1.2 1995/05/30 05:41:24 rgrimes Exp $"; +static char *rcsid = "$Id: pmap_getport.c,v 1.3 1995/10/22 14:51:31 phk Exp $"; #endif /* @@ -84,7 +84,8 @@ pmap_getport(address, program, version, protocol) } CLNT_DESTROY(client); } - (void)close(socket); + if (socket != -1) + (void)close(socket); address->sin_port = 0; return (port); } |