Skip to content

Commit a5ac5eb

Browse files
committed
Fix a bug in shutdown code
Cleaning up memory in internal function `sqlite3mcTermCipherTables` leads to a crash due to a bug. The bug went undetected during testing, because the SQLite shell doesn't call `sqlite3_shutdown`.
1 parent 75a399b commit a5ac5eb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sqlite3mc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,9 +587,9 @@ sqlite3mcTermCipherTables()
587587
{
588588
int k;
589589
CipherParams* params = globalCodecParameterTable[n].m_params;
590-
for (k = 0; params->m_name[0] != 0; ++k)
590+
for (k = 0; params[k].m_name[0] != 0; ++k)
591591
{
592-
sqlite3_free(params->m_name);
592+
sqlite3_free(params[k].m_name);
593593
}
594594
sqlite3_free(globalCodecParameterTable[n].m_params);
595595
}

0 commit comments

Comments
 (0)