Merge "Silence a memory leak warning from the static analyzer" am: f44ebf5fcb am: 20674ac1eb am: b759691046

am: 89c254612e

Change-Id: I6ee0208f290e46e1053907e853149dd5b506e2d5
This commit is contained in:
George Burgess IV
2017-07-26 01:03:50 +00:00
committed by android-build-merger

View File

@@ -400,7 +400,9 @@ TessellationCache::Buffer* TessellationCache::getOrCreateBuffer(
mProcessor = new TessellationProcessor(Caches::getInstance());
}
mProcessor->add(task);
mCache.put(entry, buffer);
bool inserted = mCache.put(entry, buffer);
// Note to the static analyzer that this insert should always succeed.
LOG_ALWAYS_FATAL_IF(!inserted, "buffers shouldn't spontaneously appear in the cache");
}
return buffer;
}