summaryrefslogtreecommitdiff
path: root/libdiskfs/boot-start.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-07-21 20:50:07 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-07-21 20:50:07 +0000
commitc073aa2eb56b2b59da29e2b4e20deee86544d5a2 (patch)
treeb50fa278ba57d6243ea79b2766c2d3cb67efe758 /libdiskfs/boot-start.c
parentd1cb1c073c0886d6061a803b98890b5655c9a31b (diff)
(diskfs_start_bootstrap): Free initial reference created by
ports_allocate_port.
Diffstat (limited to 'libdiskfs/boot-start.c')
-rw-r--r--libdiskfs/boot-start.c10
1 files 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;