diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-05 15:25:35 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-05 15:25:35 +0000 |
commit | a73ec67e8d016b16b670234d47b0b0fc7a9b1d6d (patch) | |
tree | 289d5d0389e0ab1e7381d1c45869de55092e10b9 /hash.c | |
parent | 03a4a0f1d2d0bdc7ff2fdedce2f5e67ae5cefdc9 (diff) | |
download | ruby-a73ec67e8d016b16b670234d47b0b0fc7a9b1d6d.tar.gz |
* hash.c (env_rassoc): remove access to free'd environment on mswin32.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -2372,8 +2372,9 @@ env_rassoc(VALUE dmy, VALUE obj) if (s++) { long len = strlen(s); if (RSTRING_LEN(obj) == len && strncmp(s, RSTRING_PTR(obj), len) == 0) { + VALUE result = rb_assoc_new(rb_tainted_str_new(*env, s-*env-1), obj); FREE_ENVIRON(environ); - return rb_assoc_new(rb_tainted_str_new(*env, s-*env-1), obj); + return result; } } env++; |