commit 7fafff4d3a9804c331b32b5668dab457a8ce94c4 Author: Laurynas Biveinis Date: Tue Jun 6 12:51:46 2017 +0300 Fix bug 81714 / 1587873 (mysqldump get_view_structure does not free MYSQL_RES in one error path) Add a missing mysql_free_result(table_res) for one of the early error returns in mysqldump.cc:get_view_structure. diff --git a/client/mysqldump.cc b/client/mysqldump.cc index 58ee173e967..00e17fda4b9 100644 --- a/client/mysqldump.cc +++ b/client/mysqldump.cc @@ -5967,7 +5967,10 @@ static bool get_view_structure(char *table, char* db) if (path) { if (!(sql_file= open_sql_file_for_table(table, O_WRONLY))) + { + mysql_free_result(table_res); DBUG_RETURN(1); + } write_header(sql_file, db); }