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

Commit 26a51644 authored by Yang Ni's avatar Yang Ni Committed by android-build-merger
Browse files

Merge "Destroy Allocation right away on exception" am: 52bc790f am: a37bef76

am: fd9f0919

Change-Id: Ie83694e722af77c7fc324b8b850e4308f093ab04
parents b9e1b02f fd9f0919
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2895,6 +2895,7 @@ public class Allocation extends BaseObj {
            mAllocationArray[0] = createTyped(rs, t, usage);
            if ((usage & USAGE_IO_INPUT) != 0) {
                if (numAlloc > MAX_NUMBER_IO_INPUT_ALLOC) {
                    mAllocationArray[0].destroy();
                    throw new RSIllegalArgumentException("Exceeds the max number of Allocations allowed: " +
                                                         MAX_NUMBER_IO_INPUT_ALLOC);
                }