Skip to content

Commit

Permalink
MDEV-30936 fixup
Browse files Browse the repository at this point in the history
fil_space_t::~fil_space_t(): Invoke ut_free(name) because
doing so in the callers would trip MSAN_OPTIONS=poison_in_dtor=1
  • Loading branch information
dr-m committed Mar 28, 2023
1 parent dfa9025 commit 402f36d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions storage/innobase/fil/fil0fil.cc
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
Expand Down
1 change: 1 addition & 0 deletions storage/innobase/include/fil0fil.h
Expand Up @@ -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 */
Expand Down

0 comments on commit 402f36d

Please sign in to comment.