From d57b2fed12bfeca3e1d095c6dbbc6bc3cab9833d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 30 Apr 2008 12:32:35 +0200 Subject: [PATCH] Always close the db, sqlite3_close() has to free memory. --- src/csync_journal.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/csync_journal.c b/src/csync_journal.c index e777a02f8..f81335e78 100644 --- a/src/csync_journal.c +++ b/src/csync_journal.c @@ -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; }