Skip to content

Commit c706006

Browse files
committed
target/esp32c6: fix double allocation of esp_riscv_common
1 parent db15fb7 commit c706006

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/target/espressif/esp32c6.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static int esp32c6_init_target(struct command_context *cmd_ctx,
241241

242242
target->semihosting->user_command_extension = esp_semihosting_common;
243243

244-
struct esp_riscv_common *esp_riscv = calloc(1, sizeof(*esp_riscv));
244+
struct esp_riscv_common *esp_riscv = target_to_esp_riscv(target);
245245

246246
ret = esp_riscv_init_arch_info(cmd_ctx,
247247
target,

0 commit comments

Comments
 (0)