diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index e26e0c736..a471df098 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-12-12 Christopher Faylor + + * 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 * times.cc (hires_ms::usecs): Correct order when checking if high diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 4e8f1a899..bf82ab219 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)