diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-23 01:07:21 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2024-12-23 01:07:21 +0100 |
commit | 48e1c56161d40e0fb761f11a7c076553886fb7e4 (patch) | |
tree | 6ddcb4fc5bd83229c488ae4b1a6afff142d920e9 /rumpdisk | |
parent | af488a9e8b8e0de5f0c97d07beabbe43249c4b97 (diff) | |
download | hurd-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 'rumpdisk')
-rw-r--r-- | rumpdisk/block-rump.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rumpdisk/block-rump.c b/rumpdisk/block-rump.c index 71435f20..309495dd 100644 --- a/rumpdisk/block-rump.c +++ b/rumpdisk/block-rump.c @@ -182,11 +182,14 @@ rumpdisk_device_init (void) { device_close (device); mach_port_deallocate (mach_task_self (), device); + mach_port_deallocate (mach_task_self (), device_master); fprintf(stderr, "Kernel is already driving a SATA device, skipping probing " RUMP_TYPE_STRING " disks\n"); fflush(stderr); disabled = 1; return; } + + mach_port_deallocate (mach_task_self (), device_master); } rump_init (); } |