[MDEV-20124] innodb row_log_allocate log->crypt_tail memory allocation failure will fail to free log->crypt_head Created: 2019-07-23  Updated: 2020-03-29  Resolved: 2020-03-29

Status: Closed
Project: MariaDB Server
Component/s: Encryption, Storage Engine - InnoDB
Affects Version/s: 10.1.40, 10.4.6
Fix Version/s: N/A

Type: Bug Priority: Minor
Reporter: Daniel Black Assignee: Nikita Malyavin
Resolution: Not a Bug Votes: 0
Labels: beginner-friendly


 Description   

If the crypt_head memory allocation is successful but the crypt_tail fails there is a memory leak in the innodb function row_log_allocate



 Comments   
Comment by Daniel Black [ 2020-01-28 ]

#1221 is only partially related. Its based on the code here https://github.com/MariaDB/server/blob/89633995e4962a7ad4a241cdf62ee637990d6787/storage/innobase/row/row0log.cc#L3241 that if one of head or tail succeed in allocation and the other fails. Neither memory is free. Its would be quite hard to get a SQL test case to reproduce it. Just a little more code to free individual head/tail if one of them fails is needed.

Generated at Thu Feb 08 08:57:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.