summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libtrivfs/protid-clean.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libtrivfs/protid-clean.c b/libtrivfs/protid-clean.c
index 76d79968..cc7726e1 100644
--- a/libtrivfs/protid-clean.c
+++ b/libtrivfs/protid-clean.c
@@ -27,11 +27,11 @@ trivfs_clean_protid (void *arg)
if (trivfs_protid_destroy_hook)
(*trivfs_protid_destroy_hook) (cred);
mutex_lock (&cred->po->cntl->lock);
- if (!cred->po->refcnt--)
+ if (!--cred->po->refcnt)
{
if (trivfs_peropen_destroy_hook)
(*trivfs_peropen_destroy_hook) (cred->po);
- ports_done_with_port (cred->po->cntl);
+ ports_port_deref (cred->po->cntl);
free (cred->po);
}
mutex_unlock (&cred->po->cntl->lock);