From 4ac62c133336ddbd58a34418d0206f57bc4fc145 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 5 May 2010 17:59:14 -0700 Subject: [PATCH] correctly free the wrapped result in case of EOF This is a followup to aa9f4351416a2346717c09a01e2aa66c223884b6 which made the same change 10 lines down. --- ext/mysql2_ext.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/mysql2_ext.c b/ext/mysql2_ext.c index 6b8b1be..820d53f 100644 --- a/ext/mysql2_ext.c +++ b/ext/mysql2_ext.c @@ -611,7 +611,7 @@ static VALUE rb_mysql_result_each(int argc, VALUE * argv, VALUE self) { if (row == Qnil) { // we don't need the mysql C dataset around anymore, peace it - rb_mysql_result_free(wrapper->result); + rb_mysql_result_free(wrapper); return Qnil; }