summaryrefslogtreecommitdiffstats
path: root/hash.c
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
commit3edcc4bbc67f1534a0423b82d8d82b41a7a3b1a4 (patch)
treeb3c22235705cc59003034787872ecc7d754289e9 /hash.c
parent89dd7a690159e6548d1a3648105f10dabb121af9 (diff)
downloadruby-3edcc4bbc67f1534a0423b82d8d82b41a7a3b1a4.tar.gz
ruby-3edcc4bbc67f1534a0423b82d8d82b41a7a3b1a4.tar.xz
ruby-3edcc4bbc67f1534a0423b82d8d82b41a7a3b1a4.zip
* hash.c (ruby_setenv): use ruby_strdup().
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@25717 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hash.c b/hash.c
index bc5e5b300..2ae9a7dd2 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 */
}