Commit c89f3798 authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-21478 fixup: Avoid a memory leak

parent ea9cd97f
/***************************************************************************** /*****************************************************************************
Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2005, 2019, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2013, 2020, MariaDB Corporation. Copyright (c) 2013, 2021, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software the terms of the GNU General Public License as published by the Free Software
...@@ -4657,6 +4657,7 @@ prepare_inplace_alter_table_dict( ...@@ -4657,6 +4657,7 @@ prepare_inplace_alter_table_dict(
} }
if (dict_col_name_is_reserved(field->field_name)) { if (dict_col_name_is_reserved(field->field_name)) {
wrong_column_name:
dict_mem_table_free(ctx->new_table); dict_mem_table_free(ctx->new_table);
my_error(ER_WRONG_COLUMN_NAME, MYF(0), my_error(ER_WRONG_COLUMN_NAME, MYF(0),
field->field_name); field->field_name);
...@@ -4674,9 +4675,7 @@ prepare_inplace_alter_table_dict( ...@@ -4674,9 +4675,7 @@ prepare_inplace_alter_table_dict(
|| col_len != sizeof(doc_id_t) || col_len != sizeof(doc_id_t)
|| strcmp(field->field_name, || strcmp(field->field_name,
FTS_DOC_ID_COL_NAME)) { FTS_DOC_ID_COL_NAME)) {
my_error(ER_WRONG_COLUMN_NAME, MYF(0), goto wrong_column_name;
field->field_name);
goto new_clustered_failed;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment