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:
-rw-r--r--winsup/cygwin/fhandler_process.cc2
-rw-r--r--winsup/cygwin/pinfo.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc
index 360d8ea81..eb5a523ff 100644
--- a/winsup/cygwin/fhandler_process.cc
+++ b/winsup/cygwin/fhandler_process.cc
@@ -583,7 +583,7 @@ format_process_environ (void *data, char *&destbuf)
cfree (destbuf);
destbuf = NULL;
}
- destbuf = p->environ (fs);
+ destbuf = p ? p->environ (fs) : NULL;
if (!destbuf || !*destbuf)
{
destbuf = cstrdup ("<defunct>");
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 044c4fc3c..7193f6884 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1036,7 +1036,7 @@ char *
_pinfo::environ (size_t& n)
{
char **env = NULL;
- if (!this || !pid)
+ if (!pid)
return NULL;
if (ISSTATE (this, PID_NOTCYGWIN))
{