diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-19 00:21:56 -0800 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-12-19 00:21:56 -0800 |
| commit | 2a49cd176e4046cf08cd6cc1350216031e4d847b (patch) | |
| tree | bcd500557e3db8ead29dd747f81922c94cd09b27 /src | |
| parent | 45003023cf4100746603e0a799bcd0e1f2f70522 (diff) | |
| parent | 1187bb5f055fc9814790e9d71bb5698c7a055ecd (diff) | |
| download | mruby-2a49cd176e4046cf08cd6cc1350216031e4d847b.tar.gz mruby-2a49cd176e4046cf08cd6cc1350216031e4d847b.zip | |
Merge pull request #645 from skandhas/pr-fix-memory-leak-in-make_cdump_irep
fix memory leak in function: make_cdump_irep
Diffstat (limited to 'src')
| -rw-r--r-- | src/cdump.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cdump.c b/src/cdump.c index ba3b51e32..89ae0bbff 100644 --- a/src/cdump.c +++ b/src/cdump.c @@ -166,6 +166,10 @@ make_cdump_irep(mrb_state *mrb, int irep_no, FILE *f) } else SOURCE_CODE0(""); + + if (buf) + mrb_free(mrb, buf); + return MRB_CDUMP_OK; } |
