From 27e3cc841cb7c991f40247632a98ddb614494fbc Mon Sep 17 00:00:00 2001 From: kazu Date: Wed, 26 Nov 2008 06:39:14 +0000 Subject: [PATCH] * 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 --- ChangeLog | 4 ++++ ext/gdbm/gdbm.c | 1 + 2 files changed, 5 insertions(+) diff --git a/ChangeLog b/ChangeLog index 731cafde9b..002966d198 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Wed Nov 26 15:16:07 2008 Kazuhiro NISHIYAMA + + * ext/gdbm/gdbm.c (rb_gdbm_nextkey): fix memory leak. + Wed Nov 26 03:17:48 2008 Yukihiro Matsumoto * 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; }