1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* process.c (rb_run_exec_options): fix resource leak.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
mame 2008-10-09 14:24:15 +00:00
parent 270f2f15be
commit ab2868bfba
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Thu Oct 9 23:19:02 2008 Yusuke Endoh <mame@tsg.ne.jp>
* process.c (rb_run_exec_options): fix resource leak.
Thu Oct 9 22:13:58 2008 Yusuke Endoh <mame@tsg.ne.jp>
* test/ruby/test_module.rb (test_remove_class_variable): add a test

View file

@ -2089,6 +2089,7 @@ rb_run_exec_options(const struct rb_exec_arg *e, struct rb_exec_arg *s)
char *cwd = my_getcwd();
rb_ary_store(soptions, EXEC_OPTION_CHDIR,
hide_obj(rb_str_new2(cwd)));
xfree(cwd);
}
if (chdir(RSTRING_PTR(obj)) == -1)
return -1;