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
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-12-13 03:54:32 +0300
committerChristopher Faylor <me@cgf.cx>2005-12-13 03:54:32 +0300
commit678a9510df0fa167ab6d23108d639e3d2f216015 (patch)
tree44f2d4b583c84ef988621b21a1c951e31e659c4d
parentc9da5a2183c06038d07b6aa13482392f9054b94c (diff)
* 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/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e26e0c736..a471df098 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 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)