diff options
author | Damien Zammit <damien@zamaudio.com> | 2020-07-28 20:08:35 +1000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2020-07-31 00:01:32 +0200 |
commit | e8064d830ff61630b8896fe1e1debcc98b5c3998 (patch) | |
tree | 90464bcec884dfbcf1d98bd0e950f5ca17b9f170 /libdiskfs | |
parent | ce016e523b8facdfc7924cf675c2d1696c7db319 (diff) | |
download | hurd-e8064d830ff61630b8896fe1e1debcc98b5c3998.tar.gz hurd-e8064d830ff61630b8896fe1e1debcc98b5c3998.tar.bz2 hurd-e8064d830ff61630b8896fe1e1debcc98b5c3998.zip |
diskfs: Don't deallocate if dotdot is null in fsys-getroot.c
Message-Id: <20200728100837.224336-2-damien@zamaudio.com>
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/fsys-getroot.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c index 735f359a..2c0d15dd 100644 --- a/libdiskfs/fsys-getroot.c +++ b/libdiskfs/fsys-getroot.c @@ -194,7 +194,8 @@ diskfs_S_fsys_getroot (struct diskfs_control *pt, if (! err) { - mach_port_deallocate (mach_task_self (), dotdot); + if (dotdot != MACH_PORT_NULL) + mach_port_deallocate (mach_task_self (), dotdot); *retry = FS_RETRY_NORMAL; *retryname = '\0'; *returned_port = ports_get_right (newpi); |