diff options
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/ifsock.c | 2 | ||||
-rw-r--r-- | libdiskfs/node-nput.c | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/libdiskfs/ifsock.c b/libdiskfs/ifsock.c index 9199fdf6..01a9b1ea 100644 --- a/libdiskfs/ifsock.c +++ b/libdiskfs/ifsock.c @@ -121,7 +121,7 @@ diskfs_S_ifsock_getsockaddr (struct protid *cred, if (old != MACH_PORT_NULL) mach_port_deallocate (mach_task_self (), old); np->sockaddr = sockaddr; - diskfs_nref (np); + diskfs_nref_light (np); } } diff --git a/libdiskfs/node-nput.c b/libdiskfs/node-nput.c index 35f05b5d..5043ad1a 100644 --- a/libdiskfs/node-nput.c +++ b/libdiskfs/node-nput.c @@ -56,6 +56,12 @@ diskfs_nput (struct node *np) np->references++; pthread_spin_unlock (&diskfs_node_refcnt_lock); + if (np->sockaddr != MACH_PORT_NULL) + { + mach_port_deallocate (mach_task_self (), np->sockaddr); + np->sockaddr = MACH_PORT_NULL; + } + diskfs_try_dropping_softrefs (np); /* But there's no value in looping forever in this |