From cee8bb3b38ea266a5008719548965352ec695cae Mon Sep 17 00:00:00 2001 From: vallau01 Date: Tue, 9 Aug 2022 18:03:28 +0200 Subject: [PATCH] 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 --- services/std_svc/spm/el3_spmc/spmc_shared_mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 e137346e0..1da2efc14 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 @@ static long spmc_ffa_fill_desc(struct mailbox *mbox, 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; } -- 2.39.5