From 74d376be6850e2c78fe53c988d550c29bf41329a Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 12 Jun 2016 12:50:31 +0200 Subject: [PATCH] close db cursor after reading cert --- .../java/eu/siacs/conversations/persistance/DatabaseBackend.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java index f1155b07..9e108545 100644 --- a/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/DatabaseBackend.java @@ -1135,6 +1135,7 @@ public class DatabaseBackend extends SQLiteOpenHelper { } else { cursor.moveToFirst(); byte[] certificate = cursor.getBlob(cursor.getColumnIndex(SQLiteAxolotlStore.CERTIFICATE)); + cursor.close(); if (certificate == null || certificate.length == 0) { return null; }