To solve this problem, add the line DontDLClose = 1
to the odbcinst.ini file.
Oracle adds a callback to the exit function and unixODBC unloads the Easysoft ODBC-Oracle Driver on disconnect causing the callback to fail.
Setting DontDLClose stops unixODBC unloading the Easysoft ODBC-Oracle Driver on disconnect. The callback then succeeds on exit.