OSDN Git Service

Fix memory leak in SparseArrayBitmapPool
authorBobby Georgescu <georgescu@google.com>
Tue, 7 May 2013 23:41:04 +0000 (16:41 -0700)
committerBobby Georgescu <georgescu@google.com>
Wed, 8 May 2013 00:42:07 +0000 (17:42 -0700)
Bug: 8857493
Change-Id: Ie5fae457aea91973caa07f8955b1364df573821b

src/com/android/photos/data/SparseArrayBitmapPool.java

index 8512590..1ef9e9f 100644 (file)
@@ -135,6 +135,8 @@ public class SparseArrayBitmapPool {
         mStore.put(key, newNode);
         if (newNode.nextInPool == null) {
             mPoolNodesTail = newNode;
+        } else {
+            newNode.nextInPool.prevInPool = newNode;
         }
         mSizeBytes += bytes;
         return true;