[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 36/98: libports: fix right leaks when adjusting priorities
From: |
Samuel Thibault |
Subject: |
[hurd] 36/98: libports: fix right leaks when adjusting priorities |
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 2ef89abb8cbafab865baa2399e2641879b495aea
Author: Richard Braun <address@hidden>
Date: Mon Nov 25 14:10:53 2013 +0100
libports: fix right leaks when adjusting priorities
* libports/manage-multithread.c (adjust_priority): Deallocate processor set
rights before returning.
---
libports/manage-multithread.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 842665a..d034582 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -52,7 +52,7 @@ adjust_priority (unsigned int totalthreads)
t = 10 + (((totalthreads - 1) / 100) + 1) * 10;
thread_switch (MACH_PORT_NULL, SWITCH_OPTION_DEPRESS, t);
- self = MACH_PORT_NULL;
+ self = pset = pset_priv = MACH_PORT_NULL;
err = get_privileged_ports (&host_priv, NULL);
if (err)
@@ -76,6 +76,10 @@ adjust_priority (unsigned int totalthreads)
out:
if (self != MACH_PORT_NULL)
mach_port_deallocate (mach_task_self (), self);
+ if (pset != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), pset);
+ if (pset_priv != MACH_PORT_NULL)
+ mach_port_deallocate (mach_task_self (), pset_priv);
if (err && err != EPERM)
{
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, (continued)
- [hurd] 31/98: fatfs: fix error handling in diskfs_get_directs, Samuel Thibault, 2014/01/13
- [hurd] 51/98: libtrivfs: improve the trivfs_demuxer function, Samuel Thibault, 2014/01/13
- [hurd] 24/98: Clean up the included header files, Samuel Thibault, 2014/01/13
- [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 <=
- [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, 2014/01/13
- [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