diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-20 07:38:53 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-20 07:38:53 +0900 |
| commit | 217595c325a72f250a36a7c5c57b59941aa48118 (patch) | |
| tree | ecc34e45a072d7119a21674b189c5d2080430e44 /src | |
| parent | 16e1fbc1e89f0bbb45e369495ff9b6aebc08de34 (diff) | |
| download | mruby-217595c325a72f250a36a7c5c57b59941aa48118.tar.gz mruby-217595c325a72f250a36a7c5c57b59941aa48118.zip | |
need to free pooled string bodies as well
Diffstat (limited to 'src')
| -rw-r--r-- | src/state.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c index c8f3c48f8..52a1541cb 100644 --- a/src/state.c +++ b/src/state.c @@ -130,8 +130,10 @@ mrb_irep_free(mrb_state *mrb, mrb_irep *irep) if (!(irep->flags & MRB_ISEQ_NO_FREE)) mrb_free(mrb, irep->iseq); for (i=0; i<irep->plen; i++) { - if (mrb_type(irep->pool[i]) == MRB_TT_STRING) + if (mrb_type(irep->pool[i]) == MRB_TT_STRING) { + mrb_free(mrb, mrb_str_ptr(irep->pool[i])->ptr); mrb_free(mrb, mrb_obj_ptr(irep->pool[i])); + } } mrb_free(mrb, irep->pool); mrb_free(mrb, irep->syms); |
