Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4
-
None
-
Patch
Description
In the file DTest.cpp there is a wrong use of the delete keyword. The variable hugeString is allocated with:
char* hugeString=new char[HUGE_STRING+1];
It gets deallocated with:
delete hugeString;
When allocating a variable with "new type[size]" one has to deallocate with "delete [] variable". These kinds of errors can be seen when compiling with address sanitizer. I'll attach a patch.