C2: Delete mHandle properly to avoid memory leakage

The return in the destructor of C2AllocationGralloc make its mHandle
cannot be deleted properly. Remove the return and add the check for each
resource properly to ensure mHandle can be freed.

Bug: 119925123
Test: Play Youtube without increase inside memory heap
Change-Id: Ifd4f1e405a30b9993082237d6a62b8a60c0cda20
1 file changed
tree: 6d4664f3a078622629d08be31ec8122780eaa7c6
  1. codec2/
  2. hooks/
  3. media/
  4. Android.bp
  5. OWNERS