summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorunknown <konstantin@mysql.com>2005-07-01 17:51:04 +0400
committerunknown <konstantin@mysql.com>2005-07-01 17:51:04 +0400
commitb32d2ac276357828b5f814df4e6eade4d37d7d1f (patch)
treea748a4e2ee0822e22ba670fe00fb5fe945d6d4f8 /sql/sql_prepare.cc
parenteb4cb6eba3147b271d893354465e9b2b44addd20 (diff)
downloadmariadb-git-b32d2ac276357828b5f814df4e6eade4d37d7d1f.tar.gz
Fix a valgrind warning.
sql/sql_prepare.cc: A small fix for the previous patch: we should first free the prepared statement items, and then free the runtime memory root, as some memory used for cleanup is allocated in that mem root. sql/sql_select.cc: - ever free the cursor mem root in close() (it's too early).
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index d5cf671abcd..2bf2f165a66 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -2447,6 +2447,7 @@ Prepared_statement::~Prepared_statement()
if (cursor)
cursor->Cursor::~Cursor();
free_items();
+ free_root(cursor->mem_root, MYF(0));
delete lex->result;
}