From 7df314e265bb3f4df27189c7ce41dc1c89881dfe Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Sat, 28 Nov 2020 13:58:51 +0100 Subject: [PATCH] Firmware/Jlink: Fix double free when debug power-up fails (#780) --- src/platforms/hosted/jlink_adiv5_swdp.c | 2 -- src/target/adiv5_swdp.c | 2 -- 2 files changed, 4 deletions(-) diff --git a/src/platforms/hosted/jlink_adiv5_swdp.c b/src/platforms/hosted/jlink_adiv5_swdp.c index 090c1f5..4332f60 100644 --- a/src/platforms/hosted/jlink_adiv5_swdp.c +++ b/src/platforms/hosted/jlink_adiv5_swdp.c @@ -186,8 +186,6 @@ int jlink_swdp_scan(bmp_info_t *info) jlink_adiv5_swdp_error(dp); adiv5_dp_init(dp); - if (!target_list) - free(dp); return target_list?1:0; } diff --git a/src/target/adiv5_swdp.c b/src/target/adiv5_swdp.c index 3369856..0678064 100644 --- a/src/target/adiv5_swdp.c +++ b/src/target/adiv5_swdp.c @@ -82,8 +82,6 @@ int adiv5_swdp_scan(void) firmware_swdp_error(dp); adiv5_dp_init(dp); - if (!target_list) - free(dp); return target_list?1:0; }