diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2023-04-14 22:37:00 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-04-18 01:20:46 +0200 |
commit | cb9cae962c315139941a6eb0d07c6a71b658f5bb (patch) | |
tree | a9c4417a838877625b42c1e7ca7f07a36e0df503 | |
parent | 45000f12315c68f093293ec24d73860116bda0ba (diff) | |
download | glibc-cb9cae962c315139941a6eb0d07c6a71b658f5bb.tar.gz glibc-cb9cae962c315139941a6eb0d07c6a71b658f5bb.tar.xz glibc-cb9cae962c315139941a6eb0d07c6a71b658f5bb.zip |
hurd: Avoid leaking task & thread ports
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
-rw-r--r-- | hurd/catch-exc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/hurd/catch-exc.c b/hurd/catch-exc.c index d375bf6789..bec850f9c2 100644 --- a/hurd/catch-exc.c +++ b/hurd/catch-exc.c @@ -35,6 +35,7 @@ _S_catch_exception_raise (mach_port_t port, #endif ) { + error_t err; struct hurd_sigstate *ss; int signo; struct hurd_signal_detail d; @@ -83,6 +84,11 @@ _S_catch_exception_raise (mach_port_t port, MACH_PORT_NULL, MACH_MSG_TYPE_PORT_SEND, 0); + err = __mach_port_deallocate (__mach_task_self (), task); + assert_perror (err); + err = __mach_port_deallocate (__mach_task_self (), thread); + assert_perror (err); + return KERN_SUCCESS; } |