Parcel.cpp: use calloc instead of malloc
(cherrypicked from commit 6329f0199e
)
Bug: 20669363
Change-Id: Ia4c8d8ca9d8b4b87954d7267e8b1c94cf4e570e1
This commit is contained in:
parent
c31b850ee6
commit
e9881a3961
@ -1767,7 +1767,7 @@ status_t Parcel::continueWrite(size_t desired)
|
|||||||
binder_size_t* objects = NULL;
|
binder_size_t* objects = NULL;
|
||||||
|
|
||||||
if (objectsSize) {
|
if (objectsSize) {
|
||||||
objects = (binder_size_t*)malloc(objectsSize*sizeof(binder_size_t));
|
objects = (binder_size_t*)calloc(objectsSize, sizeof(binder_size_t));
|
||||||
if (!objects) {
|
if (!objects) {
|
||||||
free(data);
|
free(data);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user