[unixODBC-dev] Right way to read odbc.ini file.

ZIGLIO, Frediano, VF-IT Frediano.Ziglio at vodafone.com
Fri Sep 10 11:02:53 BST 2004


In our driver (FreeTDS ODBC driver) in SQLConnect we read odbc.ini using
SQLGetPrivateProfileString from libodbcinst.so. However I noted that
this lead to some leaks due to ini cache. SQLGetPrivateProfileString
it's also compiled in libodbc.so but it's not exported. This lead to two
different caches (but I don't think it's a problem). The real issue it's
that when our driver get unloaded (unixODBC calls lt_dlclose)
libodbcinst.so get unloaded but cache it's not freed... Perhaps you
should use atexit to free the cache at so unload ??

freddy77




More information about the unixODBC-dev mailing list