-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure long data column buffers are freed (#306)
The bind_type of the column stored in the StatementData object was not copied over to the ColumnData object created for each row. This means that the ColumnData destructor will not free the allocated buffer used with SQLGetData. Additionally, for SQL_C_BINARY columns, the data was never freed either since the destructor only checked for SQL_C_CHAR and SQL_C_WCHAR. Finally, because long data allocations are created using malloc/realloc, we need to set a flag to use free instead of delete[] in the destructor. On platforms we support, this shouldn't actually make any difference, but it is mandated by the spec and reduces noise in valgrind. Signed-off-by: Kevin Adler <[email protected]>
- Loading branch information
Showing
2 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters