summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2012-12-19 00:21:56 -0800
committerYukihiro "Matz" Matsumoto <[email protected]>2012-12-19 00:21:56 -0800
commit2a49cd176e4046cf08cd6cc1350216031e4d847b (patch)
treebcd500557e3db8ead29dd747f81922c94cd09b27 /src
parent45003023cf4100746603e0a799bcd0e1f2f70522 (diff)
parent1187bb5f055fc9814790e9d71bb5698c7a055ecd (diff)
downloadmruby-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.c4
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;
}