Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d34b139

Browse files
authoredJun 15, 2022
Merge branch 'OP-TEE:master' into multipath
2 parents 4cc2e9c + a5c30b1 commit d34b139

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed
 

‎Makefile

+6-6
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,13 @@ distclean: clean
137137
copy_export: build
138138
mkdir -p $(DESTDIR)$(SBINDIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(INCLUDEDIR)
139139
cp config.mk $(DESTDIR)/$(INCLUDEDIR)/optee_client_config.mk
140-
cp -a ${O}/libteec/libteec.so* $(DESTDIR)$(LIBDIR)
141-
cp -a ${O}/libteec/libteec.a $(DESTDIR)$(LIBDIR)
140+
cp -d ${O}/libteec/libteec.so* $(DESTDIR)$(LIBDIR)
141+
cp -d ${O}/libteec/libteec.a $(DESTDIR)$(LIBDIR)
142142
cp ${O}/tee-supplicant/tee-supplicant $(DESTDIR)$(SBINDIR)
143143
cp public/*.h $(DESTDIR)$(INCLUDEDIR)
144144
cp libckteec/include/*.h $(DESTDIR)$(INCLUDEDIR)
145-
cp -a ${O}/libckteec/libckteec.so* $(DESTDIR)$(LIBDIR)
146-
cp -a ${O}/libckteec/libckteec.a $(DESTDIR)$(LIBDIR)
145+
cp -d ${O}/libckteec/libckteec.so* $(DESTDIR)$(LIBDIR)
146+
cp -d ${O}/libckteec/libckteec.a $(DESTDIR)$(LIBDIR)
147147
cp libseteec/include/*.h $(DESTDIR)$(INCLUDEDIR)
148-
cp -a ${O}/libseteec/libseteec.so* $(DESTDIR)$(LIBDIR)
149-
cp -a ${O}/libseteec/libseteec.a $(DESTDIR)$(LIBDIR)
148+
cp -d ${O}/libseteec/libseteec.so* $(DESTDIR)$(LIBDIR)
149+
cp -d ${O}/libseteec/libseteec.a $(DESTDIR)$(LIBDIR)

‎tee-supplicant/src/tee_supplicant.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ static struct tee_shm *shm_head;
101101

102102
struct tee_supplicant_params supplicant_params = {
103103
.ta_dir = "optee_armtz",
104+
#ifdef TEE_PLUGIN_LOAD_PATH
104105
.plugin_load_path = TEE_PLUGIN_LOAD_PATH,
106+
#endif
105107
.fs_parent_path = TEE_FS_PARENT_PATH,
106108
};
107109

@@ -418,19 +420,18 @@ static uint32_t process_free(size_t num_params, struct tee_ioctl_param *params)
418420
if (!shm)
419421
return TEEC_ERROR_BAD_PARAMETERS;
420422

423+
close(shm->fd);
421424
if (shm->registered) {
422425
free(shm->p);
423426
} else {
424427
if (munmap(shm->p, shm->size) != 0) {
425428
EMSG("munmap(%p, %zu) failed - Error = %s",
426429
shm->p, shm->size, strerror(errno));
427-
close(shm->fd);
428430
free(shm);
429431
return TEEC_ERROR_BAD_PARAMETERS;
430432
}
431433
}
432434

433-
close(shm->fd);
434435
free(shm);
435436
return TEEC_SUCCESS;
436437
}

0 commit comments

Comments
 (0)
Please sign in to comment.