Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2512aade authored by Michael Wachenschwanz's avatar Michael Wachenschwanz Committed by android-build-merger
Browse files

Merge "Free mObjects if no objects left to realloc on resize" into qt-dev am:...

Merge "Free mObjects if no objects left to realloc on resize" into qt-dev am: 4f65d337 am: 811391ec
am: 4723597f

Change-Id: Ib8e446e74c94a32742efeba72915ebc7e273859a
parents 61fb77bf 4723597f
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -2823,11 +2823,17 @@ status_t Parcel::continueWrite(size_t desired)
                }
                release_object(proc, *flat, this, &mOpenAshmemSize);
            }

            if (objectsSize == 0) {
                free(mObjects);
                mObjects = nullptr;
            } else {
                binder_size_t* objects =
                    (binder_size_t*)realloc(mObjects, objectsSize*sizeof(binder_size_t));
                if (objects) {
                    mObjects = objects;
                }
            }
            mObjectsSize = objectsSize;
            mNextObjectHint = 0;
            mObjectsSorted = false;