Searched hist:a54b2f16e6fd2804e2eb76005c0908a1ffcaf845 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/arch/arm/plat-stm32mp1/ |
| H A D | main.c | a54b2f16e6fd2804e2eb76005c0908a1ffcaf845 Tue Aug 23 13:24:50 UTC 2022 Jose Quaresma <jose.quaresma@foundries.io> plat-stm32mp1: fix use of pointer after free
Fix the following with gcc12:
| In file included from lib/libutils/isoc/include/assert.h:9, | from core/include/drivers/serial.h:8, | from core/include/drivers/stm32_uart.h:10, | from core/arch/arm/plat-stm32mp1/main.c:14: | core/arch/arm/plat-stm32mp1/main.c: In function 'init_console_from_dt': | core/arch/arm/plat-stm32mp1/main.c:141:50: error: pointer 'pd' used after 'free' [-Werror=use-after-free] | 141 | IMSG("DTB enables console (%ssecure)", pd->secure ? "" : "non-"); | | ~~^~~~~~~~ | lib/libutils/ext/include/trace.h:41:22: note: in definition of macro 'trace_printf_helper' | 41 | __VA_ARGS__) | | ^~~~~~~~~~~ | core/arch/arm/plat-stm32mp1/main.c:141:9: note: in expansion of macro 'IMSG' | 141 | IMSG("DTB enables console (%ssecure)", pd->secure ? "" : "non-"); | | ^~~~ | core/arch/arm/plat-stm32mp1/main.c:139:9: note: call to 'free' here | 139 | free(pd); | | ^~~~~~~~
Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
|