mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* hash.c (ruby_setenv): use ruby_strdup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
30de9f68eb
commit
3f5fbc6c34
2 changed files with 2 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
Wed Nov 11 12:53:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Nov 11 12:54:02 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* hash.c (ruby_setenv): use ruby_strdup().
|
||||
|
||||
|
|
2
hash.c
2
hash.c
|
@ -2069,7 +2069,7 @@ ruby_setenv(const char *name, const char *value)
|
|||
for (max = i; environ[max]; max++) ;
|
||||
tmpenv = ALLOC_N(char*, max+2);
|
||||
for (j=0; j<max; j++) /* copy environment */
|
||||
tmpenv[j] = strdup(environ[j]);
|
||||
tmpenv[j] = ruby_strdup(environ[j]);
|
||||
tmpenv[max] = 0;
|
||||
environ = tmpenv; /* tell exec where it is now */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue