diff options
author | unknown <konstantin@mysql.com> | 2005-07-01 17:51:04 +0400 |
---|---|---|
committer | unknown <konstantin@mysql.com> | 2005-07-01 17:51:04 +0400 |
commit | b32d2ac276357828b5f814df4e6eade4d37d7d1f (patch) | |
tree | a748a4e2ee0822e22ba670fe00fb5fe945d6d4f8 /sql/sql_prepare.cc | |
parent | eb4cb6eba3147b271d893354465e9b2b44addd20 (diff) | |
download | mariadb-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.cc | 1 |
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; } |