i have tested the script ( odbc/Parameters/test002) with valgrind
tool as
valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./test002
and found memory leakage as follows.
Error Summary :
==15327== Mismatched free() / delete / delete []
==15327== at 0x4004E56: operator delete(void*) (vg_replace_malloc.c:244)
==15327== by 0x4015EF8: CSqlOdbcDescList::freeAllDesc() (odbcDesc.cxx:51)
==15327== by 0x401A425: CSqlOdbcStmt::SQLFreeStmt(unsigned short) (odbcStmt.cxx:169)
==15327== by 0x401A4AD: CSqlOdbcStmt::resetStmt() (odbcStmt.cxx:1461)
==15327== by 0x401AB46: CSqlOdbcStmt::SQLPrepare(unsigned char*, long) (odbcStmt.cxx:492)
==15327== by 0x401ADDA: SQLPrepare (odbcStmt.cxx:469)
==15327== by 0x8049AC8: main (in csql/test/odbc/Parameters/test002)