Merge "Silence a memory leak warning from the static analyzer"

This commit is contained in:
Treehugger Robot
2017-07-26 00:12:51 +00:00
committed by Gerrit Code Review

View File

@@ -416,7 +416,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;
}