diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-07-15 20:30:45 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2019-07-15 20:30:45 +1000 |
commit | d52ebf31afbba029d53873e53511ea4e2c915941 (patch) | |
tree | 066b64089e36550efd12c6a41ee5443f6074fce3 | |
parent | e49b492664ab49c21ed27ebdead4152792f4c542 (diff) | |
download | mariadb-git-tt-10.4-nikita.tar.gz |
MDEV-17005 ASAN heap-use-after-free in innobase_get_computed_valuett-10.4-nikita
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 8 | ||||
-rw-r--r-- | storage/innobase/include/dict0dict.ic | 3 |
2 files changed, 3 insertions, 8 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 980a3ded1ad..659fd0de2a3 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6235,14 +6235,6 @@ no_such_table: mutex_enter(&dict_sys.mutex); if (ib_table->vc_templ == NULL) { ib_table->vc_templ = UT_NEW_NOKEY(dict_vcol_templ_t()); - } else if (ib_table->get_ref_count() == 1) { - /* Clean and refresh the template if no one else - get hold on it */ - dict_free_vc_templ(ib_table->vc_templ); - ib_table->vc_templ->vtempl = NULL; - } - - if (ib_table->vc_templ->vtempl == NULL) { innobase_build_v_templ( table, ib_table, ib_table->vc_templ, NULL, true); diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index ca2e5a5c52b..41c5c2220a4 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -1274,6 +1274,9 @@ void dict_free_vc_templ( dict_vcol_templ_t* vc_templ) { + UT_DELETE_ARRAY(vc_templ->default_rec); + vc_templ->default_rec = NULL; + if (vc_templ->vtempl != NULL) { ut_ad(vc_templ->n_v_col > 0); for (ulint i = 0; i < vc_templ->n_col |