summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLixun Peng <lixun@mariadb.org>2017-01-25 00:55:37 +0800
committerLixun Peng <lixun@mariadb.org>2017-01-25 00:55:37 +0800
commitb4baf32232f15231ca3dea0e090609cb2f204f6a (patch)
tree74e4f5b632b2434b61359c1b5e7384257cb29bbe
parent50831b0f197fd1edb98aa56085e391e5033e2a54 (diff)
downloadmariadb-git-bb-10.2-flashback.tar.gz
[MDEV-11871] mysqlbinlog test case fails caused by Flashbackbb-10.2-flashback
When mysqlbinlog parses event failed, then delete_dynamic(&binlog_events) will be ingored. So it caused memory leak. Moved delete_dynamic(&binlog_events) into cleanup().
-rw-r--r--client/mysqlbinlog.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 39a879bc619..bbd4adc8459 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -1778,6 +1778,7 @@ static void cleanup()
my_free(const_cast<char*>(dirname_for_local_load));
my_free(start_datetime_str);
my_free(stop_datetime_str);
+ delete_dynamic(&binlog_events);
delete binlog_filter;
delete glob_description_event;
@@ -3030,7 +3031,6 @@ int main(int argc, char** argv)
}
fprintf(result_file, "COMMIT\n/*!*/;\n");
}
- delete_dynamic(&binlog_events);
/* Set delimiter back to semicolon */
if (!stop_event_string.is_empty())