Bug #80058 | Free creation_ctx in sp_load_for_information_schema where create_string fails (c | ||
---|---|---|---|
Submitted: | 19 Jan 2016 22:52 | Modified: | 3 Mar 2016 11:16 |
Reporter: | OCA Admin (OCA) | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server: Stored Routines | Severity: | S3 (Non-critical) |
Version: | OS: | Any | |
Assigned to: | CPU Architecture: | Any | |
Tags: | Contribution, memory leak |
[19 Jan 2016 22:52]
OCA Admin
[19 Jan 2016 22:52]
OCA Admin
Contribution submitted via Github - Free creation_ctx in sp_load_for_information_schema where create_string fails (*) Contribution by Daniel Black (Github grooverdan, mysql-server/pull/46#issuecomment-172992664): I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.
Contribution: git_patch_56422926.txt (text/plain), 916 bytes.
[20 Jan 2016 6:26]
MySQL Verification Team
Hello Daniel, Thank you for the report and contribution. Thanks, Umesh
[3 Mar 2016 11:16]
Jon Olav Hauglid
Hi Daniel and thanks for the bug report! The creation_ctx object is not allocated directly on the heap, it is using one of our custom memory allocators. (Stored_routine_creation_ctx inherits from Sql_alloc which redefines new.) Objects allocated using this memory allocator do not need to be deallocated individually, but will be deleted during a common clean-up phase later. Deletion can be required anyway to run destructors, but this should not be needed in this case.