summaryrefslogtreecommitdiff
path: root/libtrivfs/protid-clean.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-06-15 21:55:36 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-06-15 21:55:36 +0000
commit2333126e63f3b2744b108ffe607b6da85eac4ddd (patch)
treec4baef4fc5966fc83e8aca7f71d26731074a154b /libtrivfs/protid-clean.c
parentee56a14ab4bb43e35a735279ca6d54a12ad9565a (diff)
entered into RCS
Diffstat (limited to 'libtrivfs/protid-clean.c')
-rw-r--r--libtrivfs/protid-clean.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c
index cc0a12d9..192aa930 100644
--- a/libtrivfs/protid-clean.c
+++ b/libtrivfs/protid-clean.c
@@ -24,6 +24,17 @@ trivfs_clean_protid (void *arg)
{
struct trivfs_protid *cred = arg;
+ if (trivfs_protid_destroy_hook)
+ (*trivfs_protid_destroy_hook) (cred);
+ if (!cred->po->refcnt--)
+ {
+ if (trivfs_peropen_destroy_hook)
+ (*trivfs_peropen_destroy_hook) (cred->po);
+ ports_done_with_port (cred->po->cntl);
+ free (cred->po);
+ }
+ free (cred->uids);
+ free (cred->gids);
mach_port_deallocate (mach_task_self (), cred->realnode);
}