[ Reason ]
odbcinst2 is leaking memory. After a dlclose(), libodbcinst2 still has a
dynamically allocated ini cache and memory allocation for the odbcinst logger.
[ Impact ]
The leak occurs on all systems with ini-caching enabled at build time, which is
all Debian systems.
Broadly, the bug is impacting MariaDB ODBC connector. MariaDB developers
reported the bug to the upstream unixODBC.
[ Tests ]
See, for example, https://jira.mariadb.org/browse/MDEV-38838.
[ Risks ]
Memory leaks remain and impact systems using MariaDB and other databases with
unixODBC.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
[ Changes ]
The upstream patch declares the relevant destructor at compile time, adds
inst_logClose() to close and clear ODBCINSTLog, and calls inst_logClose() and
__clear_ini_cache() on shared library closure.
This version also introduces a new symbol, inst_logClose, which is fine.
[ Other info ]
Upstream MariaDB is requesting an upload to Debian stable, which I support (see
#1141600).