diff options
author | Miles Bader <miles@gnu.org> | 1996-07-20 02:36:12 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1996-07-20 02:36:12 +0000 |
commit | c89f24a2b94a6752da0498a6608990252ee5685a (patch) | |
tree | bba8479a693d6a1cba3b8945d9d4bbe85f8b5913 | |
parent | 38aab8c891f4e535c6b6f8bab95543a9517b7d76 (diff) |
(diskfs_get_file_device): Don't deallocate the device port we've fetched.
-rw-r--r-- | libdiskfs/filedev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libdiskfs/filedev.c b/libdiskfs/filedev.c index 31180aed..d7ee7030 100644 --- a/libdiskfs/filedev.c +++ b/libdiskfs/filedev.c @@ -111,8 +111,7 @@ diskfs_get_file_device (char *name, *port = ports[0]; /* Deallocate things we don't care about or that we've made copies of. */ - - for (i = 0; i < num_ports; i++) + for (i = (err || !port) ? 0 : 1; i < num_ports; i++) if (MACH_PORT_VALID (ports[i])) mach_port_deallocate (mach_task_self (), ports[i]); |