]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: don't copy path_conv in fhandler_base::reset
authorCorinna Vinschen <corinna@vinschen.de>
Wed, 10 Feb 2021 09:33:36 +0000 (10:33 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Wed, 10 Feb 2021 09:42:38 +0000 (10:42 +0100)
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>
winsup/cygwin/fhandler.cc

index 5dbbd4068ce1cfff85eac57c3d334580b3720458..ee0047ea0a45af42415b6e30a98eb80208082217 100644 (file)
@@ -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;
This page took 0.033396 seconds and 5 git commands to generate.