[MXS-331] The "data" pointed to by a DCB is freed indirectly, hard to verify Created: 2015-08-24  Updated: 2017-12-01  Resolved: 2016-11-30

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.2.0
Fix Version/s: 2.1.0

Type: New Feature Priority: Major
Reporter: martin brampton (Inactive) Assignee: markus makela
Resolution: Fixed Votes: 0
Labels: None
Environment:

All



 Description   

A DCB includes a pointer to "data". The DCB does not know what this data is, because it is dependent on how the DCB is being used. It may be the same "data" as is also pointed to by a session object.

The lack of knowledge currently means that the DCB does not handle freeing of the data, because it does not know what is involved. The logic of ensuring that it is freed is tortuous and indirect, and very difficult to validate.

It might be preferable to include in the DCB alongside the pointer to "data" a function pointer to the function that can free the data. The function might simply be the standard free function, but using a function pointer guarantees that the mechanism remains flexible.



 Comments   
Comment by markus makela [ 2016-11-30 ]

The data in the DCB is now freed by the client protocol module.

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