Merge pull request #1861 from mcginty/cursor-leak

prevent another cursor leak
fork-5.53.8
Moxie Marlinspike 2014-08-20 12:32:24 -07:00
commit 567224b4a6
1 zmienionych plików z 1 dodań i 0 usunięć

Wyświetl plik

@ -108,6 +108,7 @@ public class ApnDatabase {
} }
if (cursor == null || !cursor.moveToFirst()) { if (cursor == null || !cursor.moveToFirst()) {
if (cursor != null) cursor.close();
Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name"); Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name");
cursor = db.query(TABLE_NAME, null, cursor = db.query(TABLE_NAME, null,
BASE_SELECTION, BASE_SELECTION,