From 9b495d8c836cc4981cd0754876dbbbaadbdd64d8 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Wed, 20 Aug 2014 12:29:40 -0700 Subject: [PATCH] prevent another cursor leak // FREEBIE --- src/org/thoughtcrime/securesms/database/ApnDatabase.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/thoughtcrime/securesms/database/ApnDatabase.java b/src/org/thoughtcrime/securesms/database/ApnDatabase.java index 7bd1eefa4a..76c1f92ee4 100644 --- a/src/org/thoughtcrime/securesms/database/ApnDatabase.java +++ b/src/org/thoughtcrime/securesms/database/ApnDatabase.java @@ -108,6 +108,7 @@ public class ApnDatabase { } if (cursor == null || !cursor.moveToFirst()) { + if (cursor != null) cursor.close(); Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name"); cursor = db.query(TABLE_NAME, null, BASE_SELECTION,