Hi, I'm using the (newly released) Microsoft ODBC driver for Linux: "Driver=SQL Server Native Client 11.0" Specifically: sqlncli-11.0.1790.0.tar.gz I am using the Linux tool "valgrind" on a small test program that just tries to establish a database connection and then disconnects, for example: SQLAllocHandle(SQL_HANDLE_ENV, SQL_NULL_HANDLE, &h_env); SQLSetEnvAttr(h_env, SQL_ATTR_ODBC_VERSION, (SQLPOINTER*)SQL_OV_ODBC3, 0); SQLAllocHandle(SQL_HANDLE_DBC, h_env, &h_dbc); SQLDriverConnect(h_dbc, NULL, ... SQLDisconnect(h_dbc); SQLFreeHandle(SQL_HANDLE_DBC, h_dbc); SQLFreeHandle(SQL_HANDLE_ENV, h_env); When the call to SQLDriverConnect is successful, valgrind reports that no memory has been leaked. When the call to SQLDriverConnect fails for whatever reason (for example: database offline, host down, etc...), each call to SQLDriverConnect leaks 1034 bytes of memory. I have tried invoking SQLGetDiagRec() to free the memory but that didn't help. Any suggestions on how to avoid the memory leak? Thanks, Kert
Product Language
Version
Category
Operating System
Operating System Language
Steps to Reproduce
Actual Results
Expected Results
Platform
Virtualization
Please wait...