X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fsp.git;a=blobdiff_plain;f=odbc-store%2Fodbc-store.cpp;h=b9086bd5e7fbc476dad342d6928e0aa6ba5e1827;hp=11405e4149b8ccff9b2b1baf74dcd0c03ec81fa1;hb=99958e5c6ca14ed6290365a5e58347d82300c24a;hpb=1b40e74b3e64a25e893f3e2d07b946d8d91f6100 diff --git a/odbc-store/odbc-store.cpp b/odbc-store/odbc-store.cpp index 11405e4..b9086bd 100644 --- a/odbc-store/odbc-store.cpp +++ b/odbc-store/odbc-store.cpp @@ -314,7 +314,8 @@ ODBCStorageService::~ODBCStorageService() shutdown_wait->signal(); cleanup_thread->join(NULL); delete shutdown_wait; - SQLFreeHandle(SQL_HANDLE_ENV, m_henv); + if (m_henv != SQL_NULL_HANDLE) + SQLFreeHandle(SQL_HANDLE_ENV, m_henv); } bool ODBCStorageService::log_error(SQLHANDLE handle, SQLSMALLINT htype, const char* checkfor)