summaryrefslogtreecommitdiff
path: root/libdiskfs/io-reauthenticate.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdiskfs/io-reauthenticate.c')
-rw-r--r--libdiskfs/io-reauthenticate.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libdiskfs/io-reauthenticate.c b/libdiskfs/io-reauthenticate.c
index 69d78bc5..649315f7 100644
--- a/libdiskfs/io-reauthenticate.c
+++ b/libdiskfs/io-reauthenticate.c
@@ -35,11 +35,13 @@ diskfs_S_io_reauthenticate (struct protid *cred,
are a simpleroutine, so callers won't know to restart. */
pthread_mutex_lock (&cred->po->np->lock);
+ refcount_ref (&cred->po->refcnt);
do
err = diskfs_start_protid (cred->po, &newcred);
while (err == EINTR);
if (err)
{
+ refcount_deref (&cred->po->refcnt);
pthread_mutex_unlock (&cred->po->np->lock);
return err;
}