From 9f9d9fd183c59ce79f252381e940a01882231647 Mon Sep 17 00:00:00 2001 From: Fabian Schlenz Date: Thu, 8 Mar 2018 22:17:01 +0100 Subject: [PATCH] Fixed a source for non-closed PreparedStatements. --- .../kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt b/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt index 849bf7b..0f8d12c 100644 --- a/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt +++ b/src/main/kotlin/de/fabianonline/telegram_backup/DatabaseUpdates.kt @@ -330,6 +330,7 @@ internal class DB_Update_6(conn: Connection, db: Database) : DatabaseUpdate(conn rs.close() conn.setAutoCommit(false) ps.executeBatch() + ps.close() conn.commit() conn.setAutoCommit(true) stmt.executeUpdate("DROP TABLE messages")