From dfc38479ea034a024fbc8f991e6d9e66015225b7 Mon Sep 17 00:00:00 2001 From: "holyfoot/hf@mysql.com/hfmain.(none)" <> Date: Mon, 16 Jul 2007 19:08:07 +0500 Subject: Bug #29687 mysql_stmt_store_result memory leak in libmysqld In embedded server we use result->alloc to store field data for the result, but we didn't clean the result->alloc if the query returned an empty recordset. Cleaning for the empty recordset enabled --- libmysql/libmysql.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libmysql') diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index 72bc4445d83..1a0aae414ed 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -4945,7 +4945,7 @@ static my_bool reset_stmt_handle(MYSQL_STMT *stmt, uint flags) Reset stored result set if so was requested or it's a part of cursor fetch. */ - if (result->data && (flags & RESET_STORE_RESULT)) + if (flags & RESET_STORE_RESULT) { /* Result buffered */ free_root(&result->alloc, MYF(MY_KEEP_PREALLOC)); -- cgit v1.2.1