Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.6.4
-
None
Description
I have found a potential memory-leak bug in the project(version 10.6.4) and would like to report it to the maintainers.
In function `my_alloc` in file `mysys/my_malloc.c`, `mh` is assigned with newly allocated memory at line 90 and then assigned to `point` at line 109, and `point` is returned to the caller at line 116.
But in function `my_multi_malloc` (in file `mysys/mulalloc.c`) , `start` receives the allocated memory at line 51 and then is returned to the caller, where `start` is local.
At last, the function`alloc_gtid_pos_table` in file `sql/rpl_gtid.cc` doesn't receives the return value(allocated memory) , which may lead to a memory-leak bug.