summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libdiskfs/node-drop.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdiskfs/node-drop.c b/libdiskfs/node-drop.c
index aafbc730..763d2b61 100644
--- a/libdiskfs/node-drop.c
+++ b/libdiskfs/node-drop.c
@@ -56,6 +56,17 @@ diskfs_drop_node (struct node *np)
else
diskfs_node_update (np, 0);
+ if (np->dirmod_reqs)
+ {
+ struct dirmod *dm, *tmp;
+ for (dm = np->dirmod_reqs; dm; dm = tmp)
+ {
+ mach_port_deallocate (mach_task_self (), dm->port);
+ tmp = dm->next;
+ free (dm);
+ }
+ }
+
diskfs_node_norefs (np);
spin_unlock (&diskfs_node_refcnt_lock);
}