summaryrefslogtreecommitdiff
path: root/encoding.c
diff options
context:
space:
mode:
Diffstat (limited to 'encoding.c')
-rw-r--r--encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/encoding.c b/encoding.c
index ffeb62b656..b1fc140ad9 100644
--- a/encoding.c
+++ b/encoding.c
@@ -154,7 +154,7 @@ enc_register_at(int index, const char *name, rb_encoding *encoding)
return -1;
}
if (!ent->enc) {
- ent->enc = malloc(sizeof(rb_encoding));
+ ent->enc = xmalloc(sizeof(rb_encoding));
}
else {
obj = ent->enc->auxiliary_data;