diff options
author | Miles Bader <miles@gnu.org> | 1996-05-16 00:28:16 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-05-16 00:28:16 +0000 |
commit | a7450d88b187323b2e49d5d4bd90d55f67e30469 (patch) | |
tree | 993a723d392dfec1a2710624684abc115ea63a66 | |
parent | 58712847cdd857eff0053319dd67ec91845b63d6 (diff) |
(sock_free): Destroy SOCK's id port if necessary.
-rw-r--r-- | pflocal/sock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pflocal/sock.c b/pflocal/sock.c index 666580e4..24dda9b3 100644 --- a/pflocal/sock.c +++ b/pflocal/sock.c @@ -1,6 +1,6 @@ /* Sock functions - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1996 Free Software Foundation, Inc. Written by Miles Bader <miles@gnu.ai.mit.edu> @@ -134,6 +134,8 @@ void sock_free (struct sock *sock) { sock_shutdown (sock, SOCK_SHUTDOWN_READ | SOCK_SHUTDOWN_WRITE); + if (sock->id != MACH_PORT_NULL) + mach_port_destroy (mach_task_self (), sock->id); free (sock); } |