DB: Call mysql_library_end when closing the connection

With the previous commit double initialization of the mysql library is avoided which could have led to the segfaults.
pull/3136/head
Peter Keresztes Schmidt 2021-02-07 13:46:33 +01:00
parent aec4dbc6ff
commit 3690da90ec
1 changed files with 1 additions and 2 deletions

View File

@ -106,8 +106,7 @@ void zmDbClose() {
mysql_close(&dbconn);
// mysql_init() call implicitly mysql_library_init() but
// mysql_close() does not call mysql_library_end()
// We get segfaults and a hang when we call this. So just don't.
//mysql_library_end();
mysql_library_end();
zmDbConnected = false;
db_mutex.unlock();
}