[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 08/25: libfshelp: acquire references to control ports
From: |
Samuel Thibault |
Subject: |
[hurd] 08/25: libfshelp: acquire references to control ports |
Date: |
Mon, 24 Oct 2016 00:16:44 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 3f38f1b21cffcf669373baff46840ce0a7d902e5
Author: Justus Winter <address@hidden>
Date: Fri Nov 20 12:46:56 2015 +0100
libfshelp: acquire references to control ports
* libfshelp/translator-list.c (translator_ihash_cleanup): Release reference.
(fshelp_set_active_translator): Acquire reference
---
libfshelp/translator-list.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/libfshelp/translator-list.c b/libfshelp/translator-list.c
index c87bbaa..e043a67 100644
--- a/libfshelp/translator-list.c
+++ b/libfshelp/translator-list.c
@@ -53,8 +53,7 @@ translator_ihash_cleanup (void *element, void *arg)
if (translator->pi)
ports_port_deref (translator->pi);
- /* No need to deallocate translator->active, we only keep the name of
- the port, not a reference. */
+ mach_port_deallocate (mach_task_self (), translator->active);
free (translator->name);
free (translator);
}
@@ -124,8 +123,10 @@ fshelp_set_active_translator (struct port_info *pi,
t->pi = pi;
}
- /* No need to increment the reference count, we only keep the
- name, not a reference. */
+ if (MACH_PORT_VALID (t->active))
+ mach_port_deallocate (mach_task_self (), t->active);
+ mach_port_mod_refs (mach_task_self (), active,
+ MACH_PORT_RIGHT_SEND, +1);
t->active = active;
}
else
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (12576ff -> 341f43d), Samuel Thibault, 2016/10/23
- [hurd] 01/25: remap: Refuse non-absolute paths, Samuel Thibault, 2016/10/23
- [hurd] 04/25: Fix message about not being able to request shutdown notification, Samuel Thibault, 2016/10/23
- [hurd] 02/25: typo, Samuel Thibault, 2016/10/23
- [hurd] 07/25: Fix looping over runsystem possibilities, Samuel Thibault, 2016/10/23
- [hurd] 03/25: Fix exec crash when setexecdata has never been called, Samuel Thibault, 2016/10/23
- [hurd] 05/25: exec: Fix loading binaries without a memory manager object, Samuel Thibault, 2016/10/23
- [hurd] 10/25: Fix patch to runsystem.hurd, Samuel Thibault, 2016/10/23
- [hurd] 20/25: console-client: Remove unused variable., Samuel Thibault, 2016/10/23
- [hurd] 19/25: ext2fs: Poison pointers into dereferenced cache pages., Samuel Thibault, 2016/10/23
- [hurd] 08/25: libfshelp: acquire references to control ports,
Samuel Thibault <=
- [hurd] 15/25: Avoid fatal error handling in option parsers., Samuel Thibault, 2016/10/23
- [hurd] 25/25: boot: Ignore EINTR., Samuel Thibault, 2016/10/23
- [hurd] 24/25: Avoid warnings if increasing a threads priority fails., Samuel Thibault, 2016/10/23
- [hurd] 18/25: ext2fs: Rename parameter., Samuel Thibault, 2016/10/23
- [hurd] 09/25: Fix installing runsystem.hurd, Samuel Thibault, 2016/10/23
- [hurd] 12/25: fakeroot: set FAKED_MODE, Samuel Thibault, 2016/10/23
- [hurd] 14/25: ext2fs: Disable option to specify alternate superblock., Samuel Thibault, 2016/10/23
- [hurd] 17/25: trans/crash: Fix setting core file template at runtime., Samuel Thibault, 2016/10/23
- [hurd] 21/25: fshelp: Fix fetching the control port., Samuel Thibault, 2016/10/23
- [hurd] 06/25: startup: Fix looping over runsystem, Samuel Thibault, 2016/10/23