mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Merge pull request #3509 from Zwelf/pr-fix-memory-leak-sqlite3
Fix memory leak in SQLite3 print statement
This commit is contained in:
commit
b943ca1e0c
|
@ -162,7 +162,11 @@ extern char *sqlite3_expanded_sql(sqlite3_stmt *pStmt) __attribute__((weak));
|
||||||
void CSqliteConnection::Print()
|
void CSqliteConnection::Print()
|
||||||
{
|
{
|
||||||
if(m_pStmt != nullptr && sqlite3_expanded_sql != nullptr)
|
if(m_pStmt != nullptr && sqlite3_expanded_sql != nullptr)
|
||||||
dbg_msg("sql", "SQLite statement: %s", sqlite3_expanded_sql(m_pStmt));
|
{
|
||||||
|
char *pExpandedStmt = sqlite3_expanded_sql(m_pStmt);
|
||||||
|
dbg_msg("sql", "SQLite statement: %s", pExpandedStmt);
|
||||||
|
sqlite3_free(pExpandedStmt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSqliteConnection::Step()
|
bool CSqliteConnection::Step()
|
||||||
|
|
Loading…
Reference in a new issue