Close cursor before returning
This commit is contained in:
parent
d9bdc1357e
commit
28f52d0ea6
|
@ -905,6 +905,7 @@ public final class DBReader {
|
||||||
Cursor cursor = adapter.getImageCursor(ids);
|
Cursor cursor = adapter.getImageCursor(ids);
|
||||||
int imageCount = cursor.getCount();
|
int imageCount = cursor.getCount();
|
||||||
if (imageCount == 0) {
|
if (imageCount == 0) {
|
||||||
|
cursor.close();
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
}
|
}
|
||||||
Map<Long, FeedImage> result = new ArrayMap<>(imageCount);
|
Map<Long, FeedImage> result = new ArrayMap<>(imageCount);
|
||||||
|
|
Loading…
Reference in New Issue