aboutsummaryrefslogtreecommitdiff
path: root/acpi
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-23 01:07:21 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-12-23 01:07:21 +0100
commit48e1c56161d40e0fb761f11a7c076553886fb7e4 (patch)
tree6ddcb4fc5bd83229c488ae4b1a6afff142d920e9 /acpi
parentaf488a9e8b8e0de5f0c97d07beabbe43249c4b97 (diff)
downloadhurd-48e1c56161d40e0fb761f11a7c076553886fb7e4.tar.gz
hurd-48e1c56161d40e0fb761f11a7c076553886fb7e4.tar.bz2
hurd-48e1c56161d40e0fb761f11a7c076553886fb7e4.zip
Fix port leaks
get_privileged_ports adds a port ref, so we have to deallocate it.
Diffstat (limited to 'acpi')
-rw-r--r--acpi/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/acpi/main.c b/acpi/main.c
index 18f0afc5..a62c0700 100644
--- a/acpi/main.c
+++ b/acpi/main.c
@@ -96,6 +96,7 @@ acpi_device_open (mach_port_t reply_port, mach_msg_type_name_t reply_port_type,
if (dev_master == MACH_PORT_NULL)
return D_NO_SUCH_DEVICE;
err = device_open (dev_master, mode, name, devp);
+ mach_port_deallocate (mach_task_self (), dev_master);
if (err)
return err;
*devicePoly = MACH_MSG_TYPE_MOVE_SEND;