aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2016-07-14 06:57:31 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-07-14 06:57:31 -0700
commitabda35d2b77f2765985ab16d3417c5cce296b8af (patch)
treed97b03be42e2794b62b118feb8c25881c707fca1 /src
parent614d8f9a3c44e22d77fa909e82119e8a6746e1b1 (diff)
GrBufferAllocPool: use _throw calloc() if unchecked.
Looks like this code is using sk_calloc(), NULL on failure, accidentally instead of sk_calloc_throw(). We're using sk_malloc_throw() in the parallel code path, so it really seems like we're not checking the result pointer. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2152753002 Review-Url: https://codereview.chromium.org/2152753002
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrBufferAllocPool.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp
index d19604c718..bb73a101ee 100644
--- a/src/gpu/GrBufferAllocPool.cpp
+++ b/src/gpu/GrBufferAllocPool.cpp
@@ -281,7 +281,7 @@ void* GrBufferAllocPool::resetCpuData(size_t newSize) {
sk_free(fCpuData);
if (newSize) {
if (fGpu->caps()->mustClearUploadedBufferData()) {
- fCpuData = sk_calloc(newSize);
+ fCpuData = sk_calloc_throw(newSize);
} else {
fCpuData = sk_malloc_throw(newSize);
}