* pinfo.cc (winpids::add): Don't copy procinfo when there is no cygwin process

associated with the pid, i.e., procinfo == NULL.
This commit is contained in:
Christopher Faylor 2005-12-13 00:54:32 +00:00
parent c9da5a2183
commit 678a9510df
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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)