Skip to content

ODBC Preparator memory leak #1571

@pedrodias74

Description

@pedrodias74

Hi,

There is a memory leak in the Preparator class when using UTF16String.
The problem is that using this kind type, the Preparator class is allocating an array of UTF16String::value_type, but then tries to release an array of UTF16String, and since the types don't match it causes a memory leak.

The solution is to correct the method Preparator::freeMemory() replacing

			case DT_WCHAR:
				deleteCachedArray<UTF16String>(it->first);
				break;

by

			case DT_WCHAR:
				deleteCachedArray<UTF16String::value_type>(it->first);
				break;

Hope this helps.
Thanks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions