diff options
Diffstat (limited to 'libmachdev/ds_routines.c')
-rw-r--r-- | libmachdev/ds_routines.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libmachdev/ds_routines.c b/libmachdev/ds_routines.c index 6555d6e9..aeb7f5af 100644 --- a/libmachdev/ds_routines.c +++ b/libmachdev/ds_routines.c @@ -119,7 +119,10 @@ ds_device_open (mach_port_t open_port, mach_port_t reply_port, { err = get_privileged_ports(NULL, &dev_master); if (!err) - err = device_open (dev_master, mode, name, devp); + { + err = device_open (dev_master, mode, name, devp); + mach_port_deallocate (mach_task_self (), dev_master); + } if (!err) *devicePoly = MACH_MSG_TYPE_MOVE_SEND; } |