summaryrefslogtreecommitdiff
path: root/ext/gdbm/gdbm.c
diff options
context:
space:
mode:
authorkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-26 06:39:14 +0000
committerkazu <kazu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-11-26 06:39:14 +0000
commit27e3cc841cb7c991f40247632a98ddb614494fbc (patch)
treee436c63271688ecfcaafa5f274f65b4507596813 /ext/gdbm/gdbm.c
parent93283e75529ad1b9ec3f2b302d5e43c394863af3 (diff)
* 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
Diffstat (limited to 'ext/gdbm/gdbm.c')
-rw-r--r--ext/gdbm/gdbm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/gdbm/gdbm.c b/ext/gdbm/gdbm.c
index 1e83608..edde0d1 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;
}