[newlib-cygwin] Cygwin: don't copy path_conv in fhandler_base::reset
Corinna Vinschen
corinna@sourceware.org
Wed Feb 10 09:51:57 GMT 2021
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;
More information about the Cygwin-cvs
mailing list