Modified preferences nBox label

Fifed MySQL connection leak in case of reconnection
This commit is contained in:
Luca Deri 2016-03-06 23:29:36 +01:00
parent a949d76a02
commit 83360abc1c
2 changed files with 3 additions and 2 deletions

View file

@ -477,6 +477,7 @@ int MySQLDB::exec_sql_query(lua_State *vm, char *sql, bool limitRows) {
ntop->getTrace()->traceEvent(TRACE_ERROR, "MySQL error: [%s][%d]",
get_last_db_error(&mysql), rc);
mysql_close(&mysql);
if(m) m->unlock(__FILE__, __LINE__);
connectToDB(&mysql, true);