From c073aa2eb56b2b59da29e2b4e20deee86544d5a2 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Fri, 21 Jul 1995 20:50:07 +0000 Subject: (diskfs_start_bootstrap): Free initial reference created by ports_allocate_port. --- libdiskfs/boot-start.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c index 106d5c28..2d306621 100644 --- a/libdiskfs/boot-start.c +++ b/libdiskfs/boot-start.c @@ -62,6 +62,7 @@ diskfs_start_bootstrap (char **argv) char *initname, *initnamebuf; char *exec_argv; int exec_argvlen; + struct port_info *bootinfo; saved_argv = argv; @@ -130,12 +131,13 @@ diskfs_start_bootstrap (char **argv) assert (retry == FS_RETRY_NORMAL); assert (pathbuf[0] == '\0'); - bootpt = ports_get_right (ports_allocate_port (diskfs_port_bucket, - sizeof (struct port_info), - diskfs_initboot_class)); + bootinfo = ports_allocate_port (diskfs_port_bucket, + sizeof (struct port_info), + diskfs_initboot_class); + bootpt = ports_get_right (bootinfo); mach_port_insert_right (mach_task_self (), bootpt, bootpt, MACH_MSG_TYPE_MAKE_SEND); - + ports_port_deref (bootinfo); portarray[INIT_PORT_CRDIR] = root_pt; portarray[INIT_PORT_CWDIR] = root_pt; -- cgit v1.2.3