From 3800229e657f9928bd5c4505c9eecb2dd1d233e9 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 21 Jul 1995 20:51:48 +0000 Subject: (start_execserver): Free initial reference created by ports_allocate_port. --- libdiskfs/boot-start.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'libdiskfs') 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); -- cgit v1.2.3