Fixed a pointer use after free.

git-svn-id: http://yate.null.ro/svn/yate/trunk@6104 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2016-03-17 19:00:17 +00:00
parent 2461efa911
commit 648123eb0a
1 changed files with 2 additions and 1 deletions

View File

@ -281,9 +281,10 @@ void MyConn::closeConn()
MYSQL* tmp = m_conn;
m_conn = 0;
mysql_close(tmp);
String name(*this);
if (m_owner)
m_owner->m_connections.remove(this);
Debug(&module,DebugInfo,"Database connection '%s' closed",c_str());
Debug(&module,DebugInfo,"Database connection '%s' closed",name.c_str());
}
void MyConn::runQueries()