diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2021-04-20 23:09:01 +0300 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2021-04-20 23:19:25 +0300 |
commit | 6244876488f41c4aec8e55ede37625b5bc649bbd (patch) | |
tree | 413432f7bb8fa76cde7e81019eb41be28b789648 /sql/event_queue.cc | |
parent | 922e676b43c7b5cb0f20ca67c6d2222e2fc5ec03 (diff) | |
download | mariadb-git-6244876488f41c4aec8e55ede37625b5bc649bbd.tar.gz |
MDEV-24807:A possibility for double free in dtor of Event_queue_element_for_exec in the case of OOM
Eliminate a memory leak when init can fail by forgetting to delete the
Event_queue_element_for_exec object.
Diffstat (limited to 'sql/event_queue.cc')
-rw-r--r-- | sql/event_queue.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 904efe26f36..4398b650fd7 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -635,6 +635,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd, if (!(*event_name= new Event_queue_element_for_exec()) || (*event_name)->init(top->dbname, top->name)) { + delete *event_name; ret= TRUE; break; } |