commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 06/28: libdiskfs: fix removal of socket nodes


From: Samuel Thibault
Subject: [hurd] 06/28: libdiskfs: fix removal of socket nodes
Date: Wed, 16 Nov 2016 08:30:26 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 74bfb99acf027265b8b588ea3fa15204c426f919
Author: Samuel Thibault <address@hidden>
Date:   Mon Oct 31 19:08:58 2016 +0100

    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.
---
 libdiskfs/node-nrele.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/libdiskfs/node-nrele.c b/libdiskfs/node-nrele.c
index ed418a1..7368835 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

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]