diff options
| author | 2020-07-13 17:54:13 +0000 | |
|---|---|---|
| committer | 2020-07-13 17:54:13 +0000 | |
| commit | 44dfbadd4abcb10bcf7be2adcf4e541b85591dec (patch) | |
| tree | 72377cde4a2e5657976a2a374b54eee9e28f5068 | |
| parent | 6bcb09e6d9e9134718f58932e13b3def402f946d (diff) | |
| parent | 4a0a55e0b68e34f411e436b19e3997a81078cdeb (diff) | |
Merge "Update parcel data pointer after realloc with size 0" into rvc-qpr-dev
| -rw-r--r-- | libs/binder/Parcel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 9642a87f4e..598fecef5d 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -2460,7 +2460,7 @@ status_t Parcel::restartWrite(size_t desired) releaseObjects(); - if (data) { + if (data || desired == 0) { LOG_ALLOC("Parcel %p: restart from %zu to %zu capacity", this, mDataCapacity, desired); pthread_mutex_lock(&gParcelGlobalAllocSizeLock); gParcelGlobalAllocSize += desired; |