[ODBC-390] Using SQL_ATTR_QUERY_TIMEOUT leaks memory Created: 2023-04-28  Updated: 2023-04-28  Resolved: 2023-04-28

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.1.18
Fix Version/s: 3.1.19

Type: Bug Priority: Major
Reporter: markus makela Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None


 Description   

If the query timeout is set, the driver leaks memory both if the query times out or if it finishes normally.



 Comments   
Comment by Lawrin Novitsky [ 2023-04-28 ]

The string with new query text in MADB_AddQueryTime was allocated and then duplicated, when copied to the Stmt structures, but not freed afterwards. But the fix actually removes duplication

Generated at Thu Feb 08 03:28:21 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.