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

* encoding.c (enc_register_at): make own copy. [ruby-dev:33136]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-01-16 13:45:29 +00:00
parent 9c1bf098e0
commit d969620ea8
2 changed files with 5 additions and 0 deletions

View file

@ -1,3 +1,7 @@
Wed Jan 16 22:45:27 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* encoding.c (enc_register_at): make own copy. [ruby-dev:33136]
Wed Jan 16 18:03:10 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* io.c (pipe_open, rb_io_s_popen): clear temporary object to release

View file

@ -146,6 +146,7 @@ enc_register_at(int index, const char *name, rb_encoding *encoding)
{
struct rb_encoding_entry *ent = &enc_table.list[index];
name = strdup(name);
ent->name = name;
if (!ent->enc) ent->enc = malloc(sizeof(rb_encoding));
*ent->enc = *encoding;