This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
[PATCH 08/14] Cygwin: FIFO: fix fifo_client_handler::close
- From: Ken Brown <kbrown at cornell dot edu>
- To: "cygwin-patches at cygwin dot com" <cygwin-patches at cygwin dot com>
- Date: Sun, 14 Apr 2019 19:16:00 +0000
- Subject: [PATCH 08/14] Cygwin: FIFO: fix fifo_client_handler::close
- References: <20190414191543.3218-1-kbrown@cornell.edu>
Make sure that fhandler_base::close rather than fhandler_fifo::close
is called on the fhandler. Also, delete the fhandler, since we
allocated it.
---
winsup/cygwin/fhandler_fifo.cc | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index 2da579b95..f9796f300 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -809,7 +809,10 @@ fifo_client_handler::close ()
int res = 0;
if (fh)
- res = fh->close ();
+ {
+ res = fh->fhandler_base::close ();
+ delete fh;
+ }
if (connect_evt)
CloseHandle (connect_evt);
if (dummy_evt)
--
2.17.0