OSDN Git Service

* environ.cc (environ_init): Alloc space for TERM if it is not set, like all of
authorcgf <cgf>
Fri, 3 Dec 2004 23:49:04 +0000 (23:49 +0000)
committercgf <cgf>
Fri, 3 Dec 2004 23:49:04 +0000 (23:49 +0000)
the other environment variables.

winsup/cygwin/ChangeLog
winsup/cygwin/environ.cc

index 82e41ce..7a453be 100644 (file)
@@ -1,3 +1,8 @@
+2004-12-03  Christopher Faylor  <cgf@timesys.com>
+
+       * environ.cc (environ_init): Alloc space for TERM if it is not set,
+       like all of the other environment variables.
+
 2004-12-02  Christopher Faylor  <cgf@timesys.com>
 
        * child_info.h (child_info_fork::parent_wr_proc_pipe): New element.
index dc5079e..4b15df2 100644 (file)
@@ -746,7 +746,7 @@ environ_init (char **envp, int envc)
     }
 
   if (!sawTERM)
-    envp[i++] = cygterm;
+    envp[i++] = strdup (cygterm);
   envp[i] = NULL;
   FreeEnvironmentStrings (rawenv);