diff --git a/ChangeLog b/ChangeLog index bc0915c5b7..8f63be0488 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Thu Oct 9 23:19:02 2008 Yusuke Endoh + + * process.c (rb_run_exec_options): fix resource leak. + Thu Oct 9 22:13:58 2008 Yusuke Endoh * test/ruby/test_module.rb (test_remove_class_variable): add a test diff --git a/process.c b/process.c index de3b1a5b17..e1e7cd10bf 100644 --- a/process.c +++ b/process.c @@ -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;