diff options
Diffstat (limited to 'libnetfs')
-rw-r--r-- | libnetfs/dir-rename.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libnetfs/dir-rename.c b/libnetfs/dir-rename.c index b804393c..6950e78e 100644 --- a/libnetfs/dir-rename.c +++ b/libnetfs/dir-rename.c @@ -34,8 +34,10 @@ netfs_S_dir_rename (struct protid *fromdiruser, char *fromname, return EXDEV; /* Note that nothing is locked here */ - return netfs_attempt_rename (fromdiruser->credential, fromdiruser->po->np, - fromname, todiruser->po->np, toname); + err = netfs_attempt_rename (fromdiruser->credential, fromdiruser->po->np, + fromname, todiruser->po->np, toname); + if (!err) + mach_port_deallocate (mach_task_self (), todiruser->pi.port_right); } |