From a3c024d6ea4e67a72f03490ba937024b4f960f41 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Wed, 27 Jul 2005 14:33:09 +0000 Subject: [PATCH] * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Set membuffer to NULL. (fhandler_dev_clipboard::fixup_after_exec): Don't call close here. Just set variables directly. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/fhandler_clipboard.cc | 9 +++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b2ed31392..10f1f4f65 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2005-07-27 Christopher Faylor + + * fhandler_clipboard.cc (fhandler_dev_clipboard::close): Set membuffer + to NULL. + (fhandler_dev_clipboard::fixup_after_exec): Don't call close here. + Just set variables directly. + 2005-07-25 Christopher Faylor * include/byteswap.h: New file. diff --git a/winsup/cygwin/fhandler_clipboard.cc b/winsup/cygwin/fhandler_clipboard.cc index 84a6590b6..e5b6ebe5f 100644 --- a/winsup/cygwin/fhandler_clipboard.cc +++ b/winsup/cygwin/fhandler_clipboard.cc @@ -264,7 +264,10 @@ fhandler_dev_clipboard::close () eof = true; pos = 0; if (membuffer) - free (membuffer); + { + free (membuffer); + membuffer = NULL; + } msize = 0; } return 0; @@ -273,5 +276,7 @@ fhandler_dev_clipboard::close () void fhandler_dev_clipboard::fixup_after_exec () { - close (); + eof = false; + pos = msize = 0; + membuffer = NULL; }