* 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.
This commit is contained in:
parent
986c841b21
commit
b56c466b2c
|
@ -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>
|
2005-08-24 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* syscalls.cc (endusershell): Reset shell_fp to NULL to allow
|
* syscalls.cc (endusershell): Reset shell_fp to NULL to allow
|
||||||
|
|
|
@ -169,8 +169,11 @@ fhandler_virtual::close ()
|
||||||
{
|
{
|
||||||
if (!hExeced)
|
if (!hExeced)
|
||||||
{
|
{
|
||||||
cfree (filebuf);
|
if (filebuf)
|
||||||
filebuf = NULL;
|
{
|
||||||
|
cfree (filebuf);
|
||||||
|
filebuf = NULL;
|
||||||
|
}
|
||||||
bufalloc = (size_t) -1;
|
bufalloc = (size_t) -1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -731,13 +731,13 @@ _pinfo::commune_send (DWORD code, ...)
|
||||||
char *p;
|
char *p;
|
||||||
for (p = res.s; n && ReadFile (fromthem, p, n, &nr, NULL); p += nr, n -= nr)
|
for (p = res.s; n && ReadFile (fromthem, p, n, &nr, NULL); p += nr, n -= nr)
|
||||||
continue;
|
continue;
|
||||||
if ((unsigned) (p - res.s) != n)
|
if (n)
|
||||||
{
|
{
|
||||||
__seterrno ();
|
__seterrno ();
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
res.n = p - res.s;
|
||||||
}
|
}
|
||||||
res.n = n;
|
|
||||||
break;
|
break;
|
||||||
case PICOM_FIFO:
|
case PICOM_FIFO:
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue