mirror of
https://github.com/MariaDB/server.git
synced 2025-11-09 11:41:36 +03:00
This was generally good to get done but also needed to be able to run mariabackup test under asan. Things freed: - Allocated variables (mysql_tmpdir_list, opt_passwd etc) - InnoDB variables - Results from SQL queries (A lot of sql queries did not free their result) - Allocated sys_vars - Server variables (mysql_server_end()) - Memory allocated by plugins (encryption) - Free variables allocated by my_default. (Old code had a bug that caused these to not be freed) Other things: - Moved freeing of mysql_tmpdir_list to main, as the old code did not free the last mysqltmp_dir allocation. Now we also initialize the variable only once. - Fixed a serious, potentially 'crashing at end' bug where we called free_defaults() with wrong pointers. - Fixed a bug related to update_malloc_size() where we did not take into account the it was not changed. - Fixed a bug in Sys_var_charptr_base where we did not allocate default values. This could lead to trying to free not allocated values in xtrabackup. - Added sf_have_memory_leak() to be able to easily check if there was a memory leak when using safemalloc() - sf_report_leaked_memory() now returns 1 if a memory leak was found.
6.8 KiB
6.8 KiB