diff options
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/encoding.c b/encoding.c index 4b121ac4e1..4fc8236662 100644 --- a/encoding.c +++ b/encoding.c @@ -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; |