incorporate bzero() into WebPRescalerInit() instead of call site

Change-Id: I9ebb83e643e24bc685a1a1cb6836cb54e34a0ec8
This commit is contained in:
skal
2015-08-14 19:07:13 -07:00
parent 3ebcdd4133
commit c5f00621c7
4 changed files with 5 additions and 4 deletions

View File

@ -293,7 +293,7 @@ static int InitYUVRescaler(const VP8Io* const io, WebPDecParams* const p) {
if (has_alpha) {
tmp_size += work_size * sizeof(*work);
}
p->memory = WebPSafeCalloc(1ULL, tmp_size);
p->memory = WebPSafeMalloc(1ULL, tmp_size);
if (p->memory == NULL) {
return 0; // memory error
}
@ -465,7 +465,7 @@ static int InitRGBRescaler(const VP8Io* const io, WebPDecParams* const p) {
tmp_size2 += out_width;
}
total_size = tmp_size1 * sizeof(*work) + tmp_size2 * sizeof(*tmp);
p->memory = WebPSafeCalloc(1ULL, total_size);
p->memory = WebPSafeMalloc(1ULL, total_size);
if (p->memory == NULL) {
return 0; // memory error
}