public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] hurd: Avoid leaking task & thread ports Date: Mon, 17 Apr 2023 23:24:16 +0000 (GMT) [thread overview] Message-ID: <20230417232416.C2CE43858288@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cb9cae962c315139941a6eb0d07c6a71b658f5bb commit cb9cae962c315139941a6eb0d07c6a71b658f5bb Author: Sergey Bugaev <bugaevc@gmail.com> Date: Fri Apr 14 22:37:00 2023 +0300 hurd: Avoid leaking task & thread ports Signed-off-by: Sergey Bugaev <bugaevc@gmail.com> Diff: --- hurd/catch-exc.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; }
reply other threads:[~2023-04-17 23:24 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230417232416.C2CE43858288@sourceware.org \ --to=sthibaul@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).