summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-11 03:54:04 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-11-11 03:54:04 +0000
commit3f5fbc6c34fa9a4e63e3892b7962692dff8d9159 (patch)
treeb3c22235705cc59003034787872ecc7d754289e9
parent30de9f68eb9748a66aef6573af268fd512b86fe2 (diff)
* hash.c (ruby_setenv): use ruby_strdup().
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog2
-rw-r--r--hash.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9eaa550a6c..33d01613c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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().
diff --git a/hash.c b/hash.c
index bc5e5b3009..2ae9a7dd2f 100644
--- a/hash.c
+++ b/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 */
}