diff options
author | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:02:31 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1995-07-21 21:02:31 +0000 |
commit | d775d7de4b3b8f085d54c7b21595eecfc2fd43df (patch) | |
tree | 43a66c2ed270b2760c7b3bfa650eb27b15104b0c | |
parent | 5d1a0ef13053a7d8088cd5eaf02b8776ff87a83c (diff) |
(trivfs_handle_port): Free initial reference created by
ports_allocate_port.
-rw-r--r-- | libtrivfs/handle-port.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libtrivfs/handle-port.c b/libtrivfs/handle-port.c index 6f51ccb9..cd3a43b7 100644 --- a/libtrivfs/handle-port.c +++ b/libtrivfs/handle-port.c @@ -25,6 +25,7 @@ trivfs_handle_port (mach_port_t realnode, struct port_bucket *protid_bucket) { struct trivfs_control *cntl; + mach_port_t right; cntl = ports_allocate_port (control_bucket, sizeof (struct trivfs_control), control_class); @@ -32,5 +33,7 @@ trivfs_handle_port (mach_port_t realnode, cntl->protid_class = protid_class; cntl->protid_bucket = protid_bucket; mutex_init (&cntl->lock); - return ports_get_right (cntl); + right = ports_get_right (cntl); + ports_port_deref (cntl); + return right; } |