Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-08-24 21:45:11 +0400
committerChristopher Faylor <me@cgf.cx>2005-08-24 21:45:11 +0400
commitb56c466b2cf4eb2492bad1343561c660238fff16 (patch)
treea4d0b55216e6a79c13b44a29d8eeccd647b9153f /winsup
parent986c841b21e771daf88f9696384379946a26289a (diff)
* fhandler_virtual.cc (fhandler_virtual::close): Don't free filebuf if it's
NULL. * pinfo.cc (_pinfo::commune_send): Fix test for incorrect number of bytes read from pipe.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler_virtual.cc7
-rw-r--r--winsup/cygwin/pinfo.cc4
3 files changed, 14 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 9fff7adc3..942b38bcf 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-24 Christopher Faylor <cgf@timesys.com>
+
+ * fhandler_virtual.cc (fhandler_virtual::close): Don't free filebuf if
+ it's NULL.
+ * pinfo.cc (_pinfo::commune_send): Fix test for incorrect number of
+ bytes read from pipe.
+
2005-08-24 Corinna Vinschen <corinna@vinschen.de>
* syscalls.cc (endusershell): Reset shell_fp to NULL to allow
diff --git a/winsup/cygwin/fhandler_virtual.cc b/winsup/cygwin/fhandler_virtual.cc
index ab078d616..494e81c58 100644
--- a/winsup/cygwin/fhandler_virtual.cc
+++ b/winsup/cygwin/fhandler_virtual.cc
@@ -169,8 +169,11 @@ fhandler_virtual::close ()
{
if (!hExeced)
{
- cfree (filebuf);
- filebuf = NULL;
+ if (filebuf)
+ {
+ cfree (filebuf);
+ filebuf = NULL;
+ }
bufalloc = (size_t) -1;
}
return 0;
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index babed0cde..1a08f575b 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -731,13 +731,13 @@ _pinfo::commune_send (DWORD code, ...)
char *p;
for (p = res.s; n && ReadFile (fromthem, p, n, &nr, NULL); p += nr, n -= nr)
continue;
- if ((unsigned) (p - res.s) != n)
+ if (n)
{
__seterrno ();
goto err;
}
+ res.n = p - res.s;
}
- res.n = n;
break;
case PICOM_FIFO:
{