summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2009-08-18 15:26:17 +0200
committerBjorn Munch <Bjorn.Munch@sun.com>2009-08-18 15:26:17 +0200
commit0211f76d141128363046c000ccdec63b99d09504 (patch)
tree52cfa79aac90cc98a4aea89f92ca69b3ec9dd478 /client/mysqltest.cc
parentbc1b485f90293f95fc36e4b265370a201b8d739a (diff)
downloadmariadb-git-0211f76d141128363046c000ccdec63b99d09504.tar.gz
Bug #46164 memory leak in mysqltest after parse error with --debug
Moved some dynstr_free() further up
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index a40ee1cd1d0..fb4b9c6ec13 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -7161,6 +7161,10 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
run_query_normal(cn, command, flags, query, query_len,
ds, &ds_warnings);
+ dynstr_free(&ds_warnings);
+ if (command->type == Q_EVAL)
+ dynstr_free(&eval_query);
+
if (display_result_sorted)
{
/* Sort the result set and append it to result */
@@ -7191,11 +7195,8 @@ void run_query(struct st_connection *cn, struct st_command *command, int flags)
check_require(ds, command->require_file);
}
- dynstr_free(&ds_warnings);
if (ds == &ds_result)
dynstr_free(&ds_result);
- if (command->type == Q_EVAL)
- dynstr_free(&eval_query);
DBUG_VOID_RETURN;
}