summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-16 10:10:42 +0100
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-01-17 18:24:58 +0100
commite2b1c5c20ff1ac0017e7ac8ef853ce3326210077 (patch)
treeeeffb2c2ba82528147a577ef697cbe76a9f39dc3
parent106287af864c01f20c12d1a0a78a2469a27adc03 (diff)
libdiskfs: fix port leak
* libdiskfs/boot-start.c (get_console): Deallocate `device_master'.
-rw-r--r--libdiskfs/boot-start.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index cfe23034..9be8ed28 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -61,6 +61,7 @@ get_console ()
return MACH_PORT_NULL;
err = device_open (device_master, D_WRITE | D_READ, "console", &console);
+ mach_port_deallocate (mach_task_self (), device_master);
if (err)
return MACH_PORT_NULL;