[lib][trusty] Fix a bug in handle_set_detach_ref

Increment/decrement ref count of parent handle_set before/after
detaching child to prevent use-after-free of heap in case reference
we are removing is the last reference to parent handle_set object.

Change-Id: Ie7dc14f11602abb4ebe0e231be4e158e2296dd7f
1 file changed
tree: f292aca6551729e03a9a3d44bc70a86ce522504a
  1. app/
  2. include/
  3. lib/
  4. make/
  5. platform/
  6. target/
  7. AUTHORS
  8. LICENSE