summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2015-04-28 16:21:30 -0700
committerNick Kralevich <nnk@google.com>2015-04-28 16:21:30 -0700
commit6329f0199ed04030e6c2bd7aecd036387b732c71 (patch)
treeab69a88e2b84c9fa0dbe3befcc5ad35193d0c17c
parentb5c7ccfdc7eb5b0ab8d22084000e9c39092ccd0e (diff)
downloadnative-6329f0199ed04030e6c2bd7aecd036387b732c71.tar.gz
Parcel.cpp: use calloc instead of malloc
Bug: 20669363 Change-Id: Ia4c8d8ca9d8b4b87954d7267e8b1c94cf4e570e1
-rw-r--r--libs/binder/Parcel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 2c566f9655..09211860a2 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1626,7 +1626,7 @@ status_t Parcel::continueWrite(size_t desired)
binder_size_t* objects = NULL;
if (objectsSize) {
- objects = (binder_size_t*)malloc(objectsSize*sizeof(binder_size_t));
+ objects = (binder_size_t*)calloc(objectsSize, sizeof(binder_size_t));
if (!objects) {
free(data);