summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
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 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 */
}