diff options
Diffstat (limited to 'core/tee/tee_obj.c')
-rw-r--r-- | core/tee/tee_obj.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/core/tee/tee_obj.c b/core/tee/tee_obj.c index 78cf937..6dcfbf3 100644 --- a/core/tee/tee_obj.c +++ b/core/tee/tee_obj.c @@ -31,7 +31,6 @@ #include <tee_api_defines.h> #include <mm/tee_mmu.h> #include <tee/tee_fs.h> -#include <tee/tee_fs_defs.h> #include <tee/tee_pobj.h> #include <trace.h> #include <tee/tee_svc_storage.h> @@ -79,32 +78,20 @@ void tee_obj_close_all(struct user_ta_ctx *utc) TEE_Result tee_obj_verify(struct tee_ta_session *sess, struct tee_obj *o) { TEE_Result res; - char *file = NULL; const struct tee_file_operations *fops = o->pobj->fops; struct tee_file_handle *fh = NULL; if (!fops) return TEE_ERROR_STORAGE_NOT_AVAILABLE; - file = tee_svc_storage_create_filename(sess, - o->pobj->obj_id, - o->pobj->obj_id_len, - false); - if (file == NULL) { - res = TEE_ERROR_OUT_OF_MEMORY; - goto exit; - } - - res = fops->open(file, &fh); + res = fops->open(o->pobj, &fh); if (res == TEE_ERROR_CORRUPT_OBJECT) { EMSG("Object corrupt\n"); + fops->remove(o->pobj); tee_obj_close(to_user_ta_ctx(sess->ctx), o); - fops->remove(file); } - free(file); fops->close(&fh); -exit: return res; } |