diff options
author | Christopher Faylor <me@cgf.cx> | 2005-12-13 00:54:32 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-12-13 00:54:32 +0000 |
commit | 678a9510df0fa167ab6d23108d639e3d2f216015 (patch) | |
tree | 44f2d4b583c84ef988621b21a1c951e31e659c4d | |
parent | c9da5a2183c06038d07b6aa13482392f9054b94c (diff) | |
download | newlib-678a9510df0fa167ab6d23108d639e3d2f216015.zip newlib-678a9510df0fa167ab6d23108d639e3d2f216015.tar.gz newlib-678a9510df0fa167ab6d23108d639e3d2f216015.tar.bz2 |
* pinfo.cc (winpids::add): Don't copy procinfo when there is no cygwin process
associated with the pid, i.e., procinfo == NULL.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e26e0c7..a471df0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2005-12-12 Christopher Faylor <cgf@timesys.com> + * pinfo.cc (winpids::add): Don't copy procinfo when there is no cygwin + process associated with the pid, i.e., procinfo == NULL. + +2005-12-12 Christopher Faylor <cgf@timesys.com> + * times.cc (hires_ms::usecs): Correct order when checking if high precision time is <= current time. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 4e8f1a8..bf82ab2 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -1130,7 +1130,7 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid) out: copied[nelem] = false; - if (make_copy) + if (make_copy && p) { _pinfo *pnew = (_pinfo *) malloc (sizeof (*p.procinfo)); if (pnew) |