summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 15efa488173..ca6e0d818e2 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -1345,6 +1345,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
MYF(MY_WME)))
{
my_free(buffer); /* purecov: inspected */
+ buffer= NULL;
error=1;
}
else
@@ -1371,13 +1372,11 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
READ_INFO::~READ_INFO()
{
- if (!error)
- {
- if (need_end_io_cache)
- ::end_io_cache(&cache);
+ if (!error && need_end_io_cache)
+ ::end_io_cache(&cache);
+
+ if (buffer != NULL)
my_free(buffer);
- error=1;
- }
List_iterator<XML_TAG> xmlit(taglist);
XML_TAG *t;
while ((t= xmlit++))