diff options
author | r.tyminski <r.tyminski@partner.samsung.com> | 2017-06-05 12:44:25 +0200 |
---|---|---|
committer | r.tyminski <r.tyminski@partner.samsung.com> | 2017-06-05 12:44:25 +0200 |
commit | 146aec115cd05a164a88e6d7b07435c57a33817f (patch) | |
tree | d8099075c92576b1928069af274f9b833aca996e /core/tee/tee_obj.c | |
parent | f9a43781767007462965b21f3f518c4cfc0744c7 (diff) | |
download | tef-optee_os-146aec115cd05a164a88e6d7b07435c57a33817f.tar.gz tef-optee_os-146aec115cd05a164a88e6d7b07435c57a33817f.tar.bz2 tef-optee_os-146aec115cd05a164a88e6d7b07435c57a33817f.zip |
Update from upstream to 2.4.0 versionupstream/2.4.0upstream
Change-Id: I2b3a30f20684d6629fe379d9cd7895aff759c301
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; } |