libckteec: fix memory allocation leakage on template serialization

Fix memory allocation leakage with a call to release_serial_object()
to release obj2 before serialize_indirect_attribute() returns.

Link: https://github.com/OP-TEE/optee_client/issues/387
Fixes: e88c264ba358 ("libckteec: helper function to serialize a attribute template")
Signed-off-by: Hoyong Jin <hoyong2007@naver.com>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
1 file changed
tree: 66f5868f347c4c5d00bfc8b2a9ea96481c79ccdb
  1. .github/
  2. ci/
  3. libckteec/
  4. libseteec/
  5. libteeacl/
  6. libteec/
  7. scripts/
  8. tee-supplicant/
  9. .gitattributes
  10. .gitignore
  11. Android.bp
  12. CMakeLists.txt
  13. CMakeToolchain.txt
  14. config.mk
  15. flags.mk
  16. LICENSE
  17. Makefile
  18. optee_client.device.mk
  19. README.md
  20. typedefs.checkpatch
README.md

OP-TEE Client API

This git contains source code for the non-secure side implementation of the OP-TEE project making up the client library and tee-supplicant.

All official OP-TEE documentation has moved to http://optee.readthedocs.io. The information that used to be here in this git can be found under optee_client.

// OP-TEE core maintainers