public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: don't copy path_conv in fhandler_base::reset Date: Wed, 10 Feb 2021 09:51:57 +0000 (GMT) [thread overview] Message-ID: <20210210095157.A4AD53851C07@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c875ed3744968b19f7dd8ed6335710be55617d36 commit c875ed3744968b19f7dd8ed6335710be55617d36 Author: Corinna Vinschen <corinna@vinschen.de> Date: Wed Feb 10 10:33:36 2021 +0100 Cygwin: don't copy path_conv in fhandler_base::reset There's a slim chance that duplicating fhandlers may end up duplicating path_conv_handle handles twice ending up with a handle leak, due to fhandler_base::reset calling path_conv::operator<< after the only caller, fhandler::copyto, already called path_conv::operator=. Just drop the call which basically duplicates what path_conv::operator= already did. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- winsup/cygwin/fhandler.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc index 5dbbd4068..ee0047ea0 100644 --- a/winsup/cygwin/fhandler.cc +++ b/winsup/cygwin/fhandler.cc @@ -43,7 +43,6 @@ LONG NO_COPY fhandler_base_overlapped::asio_close_counter; void fhandler_base::reset (const fhandler_base *from) { - pc << from->pc; ra.rabuf = NULL; ra.ralen = 0; ra.raixget = 0;
reply other threads:[~2021-02-10 9:51 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=20210210095157.A4AD53851C07@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-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).