diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-13 09:33:16 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-03-13 09:33:16 +0900 |
| commit | f92a27f918edb61f6c75d85da90009824d54bb23 (patch) | |
| tree | 82732ec3ead7fc65017f6a36f340b1b9b9367837 /mrbgems | |
| parent | bf2110d2065ca56aee0b2617cdf38c2d743f70cc (diff) | |
| download | mruby-f92a27f918edb61f6c75d85da90009824d54bb23.tar.gz mruby-f92a27f918edb61f6c75d85da90009824d54bb23.zip | |
codegen.c: fix memory leak from `new_litbn()`.
Diffstat (limited to 'mrbgems')
| -rw-r--r-- | mrbgems/mruby-compiler/core/codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-compiler/core/codegen.c b/mrbgems/mruby-compiler/core/codegen.c index ecd157383..dc5b37260 100644 --- a/mrbgems/mruby-compiler/core/codegen.c +++ b/mrbgems/mruby-compiler/core/codegen.c @@ -118,7 +118,7 @@ codegen_error(codegen_scope *s, const char *message) mrb_free(s->mrb, s->iseq); for (int i=0; i<s->irep->plen; i++) { mrb_pool_value *pv = &s->pool[i]; - if ((pv->tt & 0x3) == IREP_TT_STR) { + if ((pv->tt & 0x3) == IREP_TT_STR || pv->tt == IREP_TT_BIGINT) { mrb_free(s->mrb, (void*)pv->u.str); } } |
