summaryrefslogtreecommitdiff
path: root/libnetfs/io-reauthenticate.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2015-10-11 22:02:41 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-10-11 22:02:41 +0200
commitbd7e7ae44c78bcfe623dec8636375685c8c30be3 (patch)
treef9356a61c94113003ff40c3c327b65688c006dff /libnetfs/io-reauthenticate.c
parentbf6d5e67e86a059c1ffbde425d0f3f05fd0a0717 (diff)
Drop duplicate port deallocation
Follow-up dbfa8a3 * libnetfs/io-reauthenticate.c (netfs_S_io_reauthenticate): Do not deallocate parameter port `rend_port' when an error will be returned. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Do not deallocate parameter port `rend_port' when an error will be returned.
Diffstat (limited to 'libnetfs/io-reauthenticate.c')
-rw-r--r--libnetfs/io-reauthenticate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libnetfs/io-reauthenticate.c b/libnetfs/io-reauthenticate.c
index f4f50d52..91928130 100644
--- a/libnetfs/io-reauthenticate.c
+++ b/libnetfs/io-reauthenticate.c
@@ -43,7 +43,8 @@ netfs_S_io_reauthenticate (struct protid *user, mach_port_t rend_port)
newright, 1);
pthread_mutex_lock (&user->po->np->lock);
- mach_port_deallocate (mach_task_self (), rend_port);
+ if (!err)
+ mach_port_deallocate (mach_task_self (), rend_port);
mach_port_deallocate (mach_task_self (), newright);
mach_port_move_member (mach_task_self (), newpi->pi.port_right,