[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 |