diff --git a/core/tee/fs_dirfile.c b/core/tee/fs_dirfile.c index e7e5ed2ac5e..000abc6a63f 100644 --- a/core/tee/fs_dirfile.c +++ b/core/tee/fs_dirfile.c @@ -138,7 +138,7 @@ TEE_Result tee_fs_dirfile_open(bool create, uint8_t *hash, goto out; for (n = 0;; n++) { - struct dirfile_entry dent; + struct dirfile_entry dent = { }; res = read_dent(dirh, n, &dent); if (res) { @@ -289,7 +289,7 @@ TEE_Result tee_fs_dirfile_rename(struct tee_fs_dirfile_dirh *dirh, const void *oid, size_t oidlen) { TEE_Result res; - struct dirfile_entry dent; + struct dirfile_entry dent = { }; if (oidlen > sizeof(dent.oid)) return TEE_ERROR_BAD_PARAMETERS; @@ -324,7 +324,7 @@ TEE_Result tee_fs_dirfile_remove(struct tee_fs_dirfile_dirh *dirh, const struct tee_fs_dirfile_fileh *dfh) { TEE_Result res; - struct dirfile_entry dent; + struct dirfile_entry dent = { }; uint32_t file_number; res = read_dent(dirh, dfh->idx, &dent); @@ -350,7 +350,7 @@ TEE_Result tee_fs_dirfile_update_hash(struct tee_fs_dirfile_dirh *dirh, const struct tee_fs_dirfile_fileh *dfh) { TEE_Result res; - struct dirfile_entry dent; + struct dirfile_entry dent = { }; res = read_dent(dirh, dfh->idx, &dent); if (res) diff --git a/core/tee/tadb.c b/core/tee/tadb.c index eb7d754cb87..161c2451f74 100644 --- a/core/tee/tadb.c +++ b/core/tee/tadb.c @@ -506,7 +506,7 @@ static TEE_Result find_ent(struct tee_tadb_dir *db, const TEE_UUID *uuid, * with TEE_ERROR_ITEM_NOT_FOUND. */ for (idx = 0;; idx++) { - struct tadb_entry entry; + struct tadb_entry entry = { }; res = read_ent(db, idx, &entry); if (res) {