diff options
author | Monty <monty@mariadb.org> | 2022-11-23 17:20:59 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2022-11-24 02:28:36 +0200 |
commit | 36fcca635efc6c379f090de2484d63fb9ad7b331 (patch) | |
tree | 337db1f2a88d1554787b678f7ebbd7f380a10d51 | |
parent | 6d40274f65b8d145fbf496e9b1b1d46f258de227 (diff) | |
download | mariadb-git-36fcca635efc6c379f090de2484d63fb9ad7b331.tar.gz |
Fixed a memory leak in aria_read_log
-rw-r--r-- | storage/maria/ma_control_file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/storage/maria/ma_control_file.c b/storage/maria/ma_control_file.c index 87e8c0eac18..a6daa8bef24 100644 --- a/storage/maria/ma_control_file.c +++ b/storage/maria/ma_control_file.c @@ -640,7 +640,7 @@ my_bool print_aria_log_control() open_flags, MYF(MY_WME))) < 0) { errmsg= "Can't open file"; - goto err; + goto err2; } file_size= mysql_file_seek(file, 0, SEEK_END, MYF(MY_WME)); @@ -723,10 +723,12 @@ my_bool print_aria_log_control() (buffer + new_cf_create_time_size + CF_RECOV_FAIL_OFFSET)[0]; printf("recovery_failures: %u\n", recovery_fails); } - + mysql_file_close(file, MYF(0)); DBUG_RETURN(0); err: + mysql_file_close(file, MYF(0)); +err2: my_printf_error(HA_ERR_INITIALIZATION, "Got error '%s' when trying to use aria control file " "'%s'", 0, errmsg, name); |