close cursor in caps db query
This commit is contained in:
parent
7eb736227e
commit
9548f43998
|
@ -415,8 +415,10 @@ public class DatabaseBackend extends SQLiteOpenHelper {
|
||||||
Cursor cursor = db.query(ServiceDiscoveryResult.TABLENAME, null,
|
Cursor cursor = db.query(ServiceDiscoveryResult.TABLENAME, null,
|
||||||
ServiceDiscoveryResult.HASH + "=? AND " + ServiceDiscoveryResult.VER + "=?",
|
ServiceDiscoveryResult.HASH + "=? AND " + ServiceDiscoveryResult.VER + "=?",
|
||||||
selectionArgs, null, null, null);
|
selectionArgs, null, null, null);
|
||||||
if (cursor.getCount() == 0)
|
if (cursor.getCount() == 0) {
|
||||||
|
cursor.close();
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
cursor.moveToFirst();
|
cursor.moveToFirst();
|
||||||
|
|
||||||
ServiceDiscoveryResult result = null;
|
ServiceDiscoveryResult result = null;
|
||||||
|
|
Loading…
Reference in a new issue