aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/lazy
diff options
context:
space:
mode:
Diffstat (limited to 'src/lazy')
-rw-r--r--src/lazy/SkDiscardableMemoryPool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lazy/SkDiscardableMemoryPool.cpp b/src/lazy/SkDiscardableMemoryPool.cpp
index 1f4836604d..5b9d87ff2f 100644
--- a/src/lazy/SkDiscardableMemoryPool.cpp
+++ b/src/lazy/SkDiscardableMemoryPool.cpp
@@ -188,9 +188,9 @@ SkDiscardableMemory* DiscardableMemoryPool::create(size_t bytes) {
}
void DiscardableMemoryPool::free(PoolDiscardableMemory* dm) {
+ SkAutoMutexAcquire autoMutexAcquire(fMutex);
// This is called by dm's destructor.
if (dm->fPointer != NULL) {
- SkAutoMutexAcquire autoMutexAcquire(fMutex);
sk_free(dm->fPointer);
dm->fPointer = NULL;
SkASSERT(fUsed >= dm->fBytes);