From 402f36dd652b57a48d2d3e18949f5d7a1450363d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 28 Mar 2023 15:10:32 +0300 Subject: [PATCH] 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 --- storage/innobase/fil/fil0fil.cc | 2 -- storage/innobase/include/fil0fil.h | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index 9b6afbeb79382..e6def2968ea4a 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 b124f5c6358fc..385d547a060a5 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 */