[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 38/98: init: fix port leak
From: |
Samuel Thibault |
Subject: |
[hurd] 38/98: init: fix port leak |
Date: |
Tue, 14 Jan 2014 02:00:00 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 78636c03a561d3a9a1b7c008dc390fe854196309
Author: Justus Winter <address@hidden>
Date: Mon Nov 25 13:05:01 2013 +0100
init: fix port leak
* init/init.c (S_startup_essential_task): Fix port leak.
---
init/init.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/init/init.c b/init/init.c
index de5dd6b..b7b40bd 100644
--- a/init/init.c
+++ b/init/init.c
@@ -1202,6 +1202,10 @@ S_startup_essential_task (mach_port_t server,
static int authinit, procinit, execinit;
int fail;
+ /* Always deallocate the extra reference this message carries. */
+ if (MACH_PORT_VALID (credential))
+ mach_port_deallocate (mach_task_self (), credential);
+
if (credential != host_priv)
return EPERM;
@@ -1209,8 +1213,6 @@ S_startup_essential_task (mach_port_t server,
if (fail)
return fail;
- mach_port_deallocate (mach_task_self (), credential);
-
if (!booted)
{
if (!strcmp (name, "auth"))
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, (continued)
- [hurd] 54/98: pfinet: improve the pfinet_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 52/98: exec: improve the exec_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 34/98: mach-defpager: drop all register qualifiers, Samuel Thibault, 2014/01/13
- [hurd] 49/98: libdiskfs: improve the diskfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 56/98: auth: improve the auth_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 12/98: mach-defpager: remove unused variables, Samuel Thibault, 2014/01/13
- [hurd] 45/98: proc: store the privileged host port in _hurd_host_priv, Samuel Thibault, 2014/01/13
- [hurd] 36/98: libports: fix right leaks when adjusting priorities, Samuel Thibault, 2014/01/13
- [hurd] 65/98: trans: fix the use of the hash table in fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 37/98: libshouldbeinlibc: fix minor port leak in maptime_map, Samuel Thibault, 2014/01/13
- [hurd] 38/98: init: fix port leak,
Samuel Thibault <=
- [hurd] 68/98: trans: fix locking issue in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 55/98: pflocal: improve the demuxer functions, Samuel Thibault, 2014/01/13
- [hurd] 57/98: utils: improve the auth_demuxer function in fakeauth.c, Samuel Thibault, 2014/01/13
- [hurd] 66/98: trans: improve the performance of dir_lookup in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 41/98: libports: improve error handling in ports_reallocate_from_external, Samuel Thibault, 2014/01/13
- [hurd] 40/98: libports: improve error handling in ports_reallocate_port, Samuel Thibault, 2014/01/13
- [hurd] 58/98: trans: remove unused declaration from fakeroot.c, Samuel Thibault, 2014/01/13
- [hurd] 72/98: trans: fix reference counting bug in fakeroot, Samuel Thibault, 2014/01/13
- [hurd] 39/98: proc: update comments, Samuel Thibault, 2014/01/13
- [hurd] 26/98: Make sure created netfs nodes have stat validated, Samuel Thibault, 2014/01/13