Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[PATCH 2/4] diskfs: Don't deallocate if dotdot is null in fsys-getroot.c

0 views
Skip to first unread message

Damien Zammit

unread,
Jul 28, 2020, 6:09:16 AM7/28/20
to bug-...@gnu.org, Damien Zammit
---
libdiskfs/fsys-getroot.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

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);
--
2.25.1


Samuel Thibault

unread,
Jul 30, 2020, 6:01:53 PM7/30/20
to Damien Zammit, bug-...@gnu.org
Applied, thanks!

Damien Zammit, le mar. 28 juil. 2020 20:08:35 +1000, a ecrit:
0 new messages