* process.c (proc_setgroups): add GC guard to prevent intermediate
variable from GC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5f3e191f95
commit
012e60f61c
@ -1,3 +1,8 @@
|
|||||||
|
Tue Feb 8 01:00:21 2011 CHIKANAGA Tomoyuki <nagachika00@gmail.com>
|
||||||
|
|
||||||
|
* process.c (proc_setgroups): add GC guard to prevent intermediate
|
||||||
|
variable from GC.
|
||||||
|
|
||||||
Tue Feb 8 00:56:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Feb 8 00:56:33 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* misc/ruby-mode.el (ruby-expr-beg, ruby-in-here-doc-p): tell
|
* misc/ruby-mode.el (ruby-expr-beg, ruby-in-here-doc-p): tell
|
||||||
|
@ -4608,9 +4608,11 @@ proc_setgroups(VALUE obj, VALUE ary)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
gr = getgrnam(RSTRING_PTR(tmp));
|
gr = getgrnam(RSTRING_PTR(tmp));
|
||||||
if (gr == NULL)
|
if (gr == NULL) {
|
||||||
|
RB_GC_GUARD(tmp);
|
||||||
rb_raise(rb_eArgError,
|
rb_raise(rb_eArgError,
|
||||||
"can't find group for %s", RSTRING_PTR(tmp));
|
"can't find group for %s", RSTRING_PTR(tmp));
|
||||||
|
}
|
||||||
groups[i] = gr->gr_gid;
|
groups[i] = gr->gr_gid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user