[ https://issues.apache.org/jira/browse/XERCESC-2050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alberto Massari reassigned XERCESC-2050: ---------------------------------------- Assignee: Alberto Massari > wrong use of delete keyword in DTest.cpp > ---------------------------------------- > > Key: XERCESC-2050 > URL: https://issues.apache.org/jira/browse/XERCESC-2050 > Project: Xerces-C++ > Issue Type: Bug > Components: Samples/Tests > Affects Versions: 3.1.2 > Reporter: Hanno Böck > Assignee: Alberto Massari > Priority: Minor > Fix For: 3.1.3 > > Attachments: xerces-c-fix-alloc-dealloc.diff > > > 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. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: c-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: c-dev-h...@xerces.apache.org