summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-07-21 20:51:48 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-07-21 20:51:48 +0000
commit3800229e657f9928bd5c4505c9eecb2dd1d233e9 (patch)
tree0b5b5ded7983602eed20d81f9105c2b66e07a9a0
parentc073aa2eb56b2b59da29e2b4e20deee86544d5a2 (diff)
(start_execserver): Free initial reference created by ports_allocate_port.
-rw-r--r--libdiskfs/boot-start.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index 2d306621..a6d6e8d4 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -488,13 +488,17 @@ start_execserver (void)
{
mach_port_t right;
extern task_t diskfs_execserver_task; /* Set in boot-parse.c. */
+ struct port_info *execboot_info;
assert (diskfs_execserver_task != MACH_PORT_NULL);
- right = ports_get_right (ports_allocate_port (diskfs_port_bucket,
- sizeof (struct port_info),
- diskfs_execboot_class));
+
+ execboot_info = ports_allocate_port (diskfs_port_bucket,
+ sizeof (struct port_info),
+ diskfs_execboot_class);
+ right = ports_get_right (execboot_info)
mach_port_insert_right (mach_task_self (), right,
right, MACH_MSG_TYPE_MAKE_SEND);
+ ports_port_deref (execboot_info);
task_set_special_port (diskfs_execserver_task, TASK_BOOTSTRAP_PORT, right);
mach_port_deallocate (mach_task_self (), right);