diff options
author | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-26 06:39:14 +0000 |
---|---|---|
committer | kazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-11-26 06:39:14 +0000 |
commit | 27e3cc841cb7c991f40247632a98ddb614494fbc (patch) | |
tree | e436c63271688ecfcaafa5f274f65b4507596813 | |
parent | 93283e75529ad1b9ec3f2b302d5e43c394863af3 (diff) | |
download | ruby-27e3cc841cb7c991f40247632a98ddb614494fbc.tar.gz |
* ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/gdbm/gdbm.c | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -1,3 +1,7 @@ +Wed Nov 26 15:16:07 2008 Kazuhiro NISHIYAMA <zn@mbf.nifty.com> + + * ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak. + Wed Nov 26 03:17:48 2008 Yukihiro Matsumoto <matz@ruby-lang.org> * ext/bigdecimal/bigdecimal.c (BigDecimal_to_r): raise exception diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c index 1e83608132..edde0d19ab 100644 --- a/ext/gdbm/gdbm.c +++ b/ext/gdbm/gdbm.c @@ -344,6 +344,7 @@ rb_gdbm_nextkey(GDBM_FILE dbm, VALUE keystr) return Qnil; str = rb_str_new(key2.dptr, key2.dsize); + free(key2.dptr); OBJ_TAINT(str); return str; } |