fix potential leakage issues

If validating the size of the buffer fails during the flattening process of GraphicBuffer, fd leakage will occur; You can easily reproduce this problem when validating the size of the buffer fails or simply setting the error to non NOERROR.

Bug: 381504577
Test: Manual

Change-Id: I7e0ba4a889d6888cc5794a0f226f6638e104eb81
1 file changed