diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-31 19:08:58 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-31 19:08:58 +0100 |
commit | 74bfb99acf027265b8b588ea3fa15204c426f919 (patch) | |
tree | 69487dc9adb1e6a49c465876209de7a06f2f2221 /libdiskfs | |
parent | 267995f0c2aea8030c6126f62dc41ff63d80caa7 (diff) |
libdiskfs: fix removal of socket nodes
Follow-up on 5ab5d98fa515cd19a64e8d5868fcbae85eec9dc5 ('libdiskfs: fix
removal of socket nodes'), for diskfs_nrele.
* libdiskfs/node-nrele.c (diskfs_nrele): Deallocate right to socket
address when cleaning light references.
Diffstat (limited to 'libdiskfs')
-rw-r--r-- | libdiskfs/node-nrele.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libdiskfs/node-nrele.c b/libdiskfs/node-nrele.c index ed418a19..73688356 100644 --- a/libdiskfs/node-nrele.c +++ b/libdiskfs/node-nrele.c @@ -47,6 +47,12 @@ diskfs_nrele (struct node *np) diskfs_lost_hardrefs (np); if (!np->dn_stat.st_nlink) { + if (np->sockaddr != MACH_PORT_NULL) + { + mach_port_deallocate (mach_task_self (), np->sockaddr); + np->sockaddr = MACH_PORT_NULL; + } + /* There are no links. If there are soft references that can be dropped, we can't let them postpone deallocation. So attempt to drop them. But that's a user-supplied |