summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2023-03-28 15:10:32 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2023-03-28 15:10:32 +0300
commit402f36dd652b57a48d2d3e18949f5d7a1450363d (patch)
tree13ff18468e94ca3b682a58452eba8527cbdb758e
parentdfa90257f6a7be45b421798e56e7e9c1f27caf77 (diff)
downloadmariadb-git-402f36dd652b57a48d2d3e18949f5d7a1450363d.tar.gz
MDEV-30936 fixup
fil_space_t::~fil_space_t(): Invoke ut_free(name) because doing so in the callers would trip MSAN_OPTIONS=poison_in_dtor=1
-rw-r--r--storage/innobase/fil/fil0fil.cc2
-rw-r--r--storage/innobase/include/fil0fil.h1
2 files changed, 1 insertions, 2 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc
index 9b6afbeb793..e6def2968ea 100644
--- a/storage/innobase/fil/fil0fil.cc
+++ b/storage/innobase/fil/fil0fil.cc
@@ -873,7 +873,6 @@ fil_space_free_low(
fil_space_destroy_crypt_data(&space->crypt_data);
space->~fil_space_t();
- ut_free(space->name);
ut_free(space);
}
@@ -998,7 +997,6 @@ fil_space_t *fil_space_t::create(const char *name, ulint id, ulint flags,
mutex_exit(&fil_system.mutex);
rw_lock_free(&space->latch);
space->~fil_space_t();
- ut_free(space->name);
ut_free(space);
return(NULL);
}
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index b124f5c6358..385d547a060 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -339,6 +339,7 @@ struct fil_space_t final
#endif
{
#ifndef UNIV_INNOCHECKSUM
+ ~fil_space_t() { ut_free(name); }
friend fil_node_t;
ulint id; /*!< space id */
hash_node_t hash; /*!< hash chain node */