core: REE FS: close dirfile on error
core: REE FS: close dirfile on error

REE FS closes the dirfile if returning error from a function that may
have changed the content of a secure storage object. This effectively
undoes previous operation.

Acked-by: Jerome Forissier <ced78d268b4c9a0a20a59a9feeebd2ad90da03d3@linaro.org>
Acked-by: Volodymyr Babchuk <07adff7e050dc3230ac0b7d9c296bbb62f4ecc95@gmail.com>
Signed-off-by: Jens Wiklander <7706914404370d7502c27a0eff493dcf491feb51@linaro.org>

pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os,pascal-brand-st-dev/optee_os