summaryrefslogtreecommitdiff
path: root/iseq.c
diff options
context:
space:
mode:
authorJean Boussier <[email protected]>2024-08-11 12:58:57 +0200
committerJean Boussier <[email protected]>2024-08-11 15:04:35 +0200
commitca5b7276c668f595b8348822fc61a90cd5b9710f ()
treead4209ee97d9f267be9be09790230c8ae80891ff /iseq.c
parent1fd0a1b4ceef29a5aade5e1d896dca5b74258e6f (diff)
compile.c: don't allocate empty default values list
It just wastes memory.
Notes: Merged: https://.com/ruby/ruby/pull/11361
-rw-r--r--iseq.c4
1 files changed, 3 insertions, 1 deletions
@@ -194,7 +194,9 @@ rb_iseq_free(const rb_iseq_t *iseq)
if (body->param.keyword != NULL) {
if (body->param.keyword->table != &body->local_table[body->param.keyword->bits_start - body->param.keyword->num])
ruby_xfree((void *)body->param.keyword->table);
- ruby_xfree((void *)body->param.keyword->default_values);
ruby_xfree((void *)body->param.keyword);
}
compile_data_free(ISEQ_COMPILE_DATA(iseq));