diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-10-11 22:02:41 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2015-10-11 22:02:41 +0200 |
commit | bd7e7ae44c78bcfe623dec8636375685c8c30be3 (patch) | |
tree | f9356a61c94113003ff40c3c327b65688c006dff /libtrivfs | |
parent | bf6d5e67e86a059c1ffbde425d0f3f05fd0a0717 (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 'libtrivfs')
-rw-r--r-- | libtrivfs/io-reauthenticate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c index c75f5fcc..35775e57 100644 --- a/libtrivfs/io-reauthenticate.c +++ b/libtrivfs/io-reauthenticate.c @@ -52,7 +52,8 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, assert (newright != MACH_PORT_NULL); err = iohelp_reauth (&newcred->user, auth, rendport, newright, 1); - mach_port_deallocate (mach_task_self (), rendport); + if (!err) + mach_port_deallocate (mach_task_self (), rendport); mach_port_deallocate (mach_task_self (), auth); if (err) return err; |