mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-25 14:36:01 +03:00
Always close the db, sqlite3_close() has to free memory.
This commit is contained in:
parent
ea9819da6c
commit
d57b2fed12
1 changed files with 2 additions and 0 deletions
|
@ -55,6 +55,7 @@ static int csync_journal_check(const char *journal) {
|
|||
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "database corrupted, removing!");
|
||||
unlink(journal);
|
||||
}
|
||||
sqlite3_close(db);
|
||||
} else {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_WARN, "sqlite version mismatch");
|
||||
unlink(journal);
|
||||
|
@ -67,6 +68,7 @@ static int csync_journal_check(const char *journal) {
|
|||
sqlite3_close(db);
|
||||
return 0;
|
||||
}
|
||||
sqlite3_close(db);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue