aboutsummaryrefslogtreecommitdiff
path: root/newlib
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2002-04-01 22:29:40 +0000
committerJeff Johnston <jjohnstn@redhat.com>2002-04-01 22:29:40 +0000
commit54a7c6d2beffa00ab22e8bdf93da74989fd0d49d (patch)
tree9e498ba048a05e01300328f823e98151eb139cc1 /newlib
parent3b71b99abdf0b735866dd5cd620fb8d9368e1aba (diff)
downloadnewlib-54a7c6d2beffa00ab22e8bdf93da74989fd0d49d.zip
newlib-54a7c6d2beffa00ab22e8bdf93da74989fd0d49d.tar.gz
newlib-54a7c6d2beffa00ab22e8bdf93da74989fd0d49d.tar.bz2
2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
* libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
Diffstat (limited to 'newlib')
-rw-r--r--newlib/ChangeLog4
-rw-r--r--newlib/libc/stdlib/getenv_r.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog
index 7685a7c..4f4879b 100644
--- a/newlib/ChangeLog
+++ b/newlib/ChangeLog
@@ -1,3 +1,7 @@
+2002-04-01 Till Straumann <strauman@SLAC.Stanford.EDU>
+
+ * libc/stdlib/getenv_r.c (_findenv_r): Add missing ENV_UNLOCK.
+
Wed Mar 27 07:34:44 2002 Jason Tishler <jason@tishler.net>
* libc/include/sys/features.h (_POSIX_SEMAPHORES): New Cygwin define.
diff --git a/newlib/libc/stdlib/getenv_r.c b/newlib/libc/stdlib/getenv_r.c
index 4d567c7..2cc48cf 100644
--- a/newlib/libc/stdlib/getenv_r.c
+++ b/newlib/libc/stdlib/getenv_r.c
@@ -94,7 +94,10 @@ _DEFUN (_findenv_r, (reent_ptr, name, offset),
/* In some embedded systems, this does not get set. This protects
newlib from dereferencing a bad pointer. */
if (!*p_environ)
- return NULL;
+ {
+ ENV_UNLOCK;
+ return NULL;
+ }
c = name;
len = 0;