cipher: Fix memory leak when cancelling the cipher dialog

This commit is contained in:
Martin Kleusberg
2014-11-10 23:02:42 +01:00
parent 2c9d20d7e9
commit 3bc93af7e0

View File

@@ -74,6 +74,7 @@ bool DBBrowserDB::open(const QString& db)
err = sqlite3_prepare_v2(_db, utf8Statement, utf8Statement.length(), &vm, &tail);
if(sqlite3_step(vm) != SQLITE_ROW)
{
sqlite3_finalize(vm);
#ifdef ENABLE_SQLCIPHER
CipherDialog cipher(0, false);
if(cipher.exec())
@@ -97,7 +98,6 @@ bool DBBrowserDB::open(const QString& db)
} else {
done = true;
}
sqlite3_finalize(vm);
} while(!done);
// register collation callback