diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2002-06-13 16:30:18 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2002-06-13 16:30:18 +0000 |
commit | 0e6d80e4fa95a35c1a871e4aed5b3153529b8594 (patch) | |
tree | a14e4cd4950f5b3acd4c132b12cad9a0cedcf444 | |
parent | 1f1fb4210d7000de5d9ed7229c08b927a4a9df87 (diff) | |
download | newlib-0e6d80e4fa95a35c1a871e4aed5b3153529b8594.zip newlib-0e6d80e4fa95a35c1a871e4aed5b3153529b8594.tar.gz newlib-0e6d80e4fa95a35c1a871e4aed5b3153529b8594.tar.bz2 |
* cygheap.cc (cygheap_user::set_name): Revert previous change.
* environ.cc (spenv::retrieve): Check return value of call to
cygheap->user.*from_cygheap().
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/cygheap.cc | 2 | ||||
-rw-r--r-- | winsup/cygwin/environ.cc | 3 |
3 files changed, 10 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index a395e9a..e74d0df 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,11 @@ 2002-06-13 Corinna Vinschen <corinna@vinschen.de> + * cygheap.cc (cygheap_user::set_name): Revert previous change. + * environ.cc (spenv::retrieve): Check return value of call to + cygheap->user.*from_cygheap(). + +2002-06-13 Corinna Vinschen <corinna@vinschen.de> + * cygheap.cc (cygheap_user::set_name): Remove setting homedrive and homepath to NULL. (cygheap_user::set_logsrv): Fix free'ing of plogsrv. diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 3fd2aac..723fde2 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -443,6 +443,8 @@ cygheap_user::set_name (const char *new_name) if (pname) cfree (pname); pname = cstrdup (new_name ? new_name : ""); + homedrive = NULL; + homepath = NULL; } void diff --git a/winsup/cygwin/environ.cc b/winsup/cygwin/environ.cc index da96b52..4d535e4 100644 --- a/winsup/cygwin/environ.cc +++ b/winsup/cygwin/environ.cc @@ -786,7 +786,8 @@ spenv::retrieve (bool no_envblock, const char *const envname, int len) /* Make a FOO=BAR entry from the value returned by the cygheap_user method. */ - p = (cygheap->user.*from_cygheap) (); + if (!(p = (cygheap->user.*from_cygheap) ())) + return NULL; int namelen = strlen (name); char *s = (char *) cmalloc (HEAP_1_STR, namelen + strlen (p) + 1); strcpy (s, name); |