summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2019-12-06 02:11:14 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2019-12-06 02:11:14 +0000
commitdc3aaa41d29ddf60d0ffd5a24303c725747441d1 (patch)
tree5b15b08fc964e27d3eb749bc3f723b04d18fc364
parent71b4f4ff89f54e64d34fbd0ea934a0997316cf8c (diff)
parent5b8a4109f5195e3ca626ab1e6ce9bfd2d1c3f2a8 (diff)
downloadnative-dc3aaa41d29ddf60d0ffd5a24303c725747441d1.tar.gz
Snap for 6052638 from 5b8a4109f5195e3ca626ab1e6ce9bfd2d1c3f2a8 to qt-qpr2-release
Change-Id: I2db19cc26f7d0f094346a2732cb70e1756d7194c
-rw-r--r--libs/binder/Parcel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index afa3d33349..5ad30271d7 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -2839,11 +2839,13 @@ status_t Parcel::continueWrite(size_t desired)
if (objectsSize == 0) {
free(mObjects);
mObjects = nullptr;
+ mObjectsCapacity = 0;
} else {
binder_size_t* objects =
(binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t));
if (objects) {
mObjects = objects;
+ mObjectsCapacity = objectsSize;
}
}
mObjectsSize = objectsSize;