commit | 8f83099b1acf2e585c5602702d24067132cd960a | [log] [tgz] |
---|---|---|
author | vallau01 <valentin.laurent@trustonic.com> | Tue Aug 09 18:03:28 2022 +0200 |
committer | Lukas Hanel <lukas.hanel@trustonic.com> | Wed Nov 02 15:15:59 2022 +0100 |
tree | 75c75a98f611b476ee27fab8f2c7fb2b95b34012 | |
parent | 460d396640b685f6415912b980f639f10651f3e6 [diff] |
fix(el3-spmc): error handling in allocation Error check must be done on the previously allocated pointer, not a random one from the code. Change-Id: I1c8253eacbe778cc4a9a8d71081fc615fa7e5293 Signed-off-by: Lukas Hanel <lukas.hanel@trustonic.com>
diff --git a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c b/services/std_svc/spm/el3_spmc/spmc_shared_mem.c index e137346..1da2efc 100644 --- a/services/std_svc/spm/el3_spmc/spmc_shared_mem.c +++ b/services/std_svc/spm/el3_spmc/spmc_shared_mem.c
@@ -1030,7 +1030,7 @@ v1_1_obj = spmc_shmem_obj_alloc(&spmc_shmem_obj_state, v1_1_desc_size); - if (!obj) { + if (!v1_1_obj) { ret = FFA_ERROR_NO_MEMORY; goto err_arg; }