summaryrefslogtreecommitdiffstats
path: root/libs/binder
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 21:31:20 -0700
commite9881a3961888c4264034473021f42f9f0305026 (patch)
tree02ac266db063f0813158d494bb278fb196ec90b4 /libs/binder
parentc31b850ee6994394fea1448f244db867817465ed (diff)
downloadframeworks_native-e9881a3961888c4264034473021f42f9f0305026.zip
frameworks_native-e9881a3961888c4264034473021f42f9f0305026.tar.gz
frameworks_native-e9881a3961888c4264034473021f42f9f0305026.tar.bz2
Parcel.cpp: use calloc instead of malloc
(cherrypicked from commit 6329f0199ed04030e6c2bd7aecd036387b732c71) Bug: 20669363 Change-Id: Ia4c8d8ca9d8b4b87954d7267e8b1c94cf4e570e1
Diffstat (limited to 'libs/binder')
-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 0e11d53..1b197a4 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -1767,7 +1767,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);