Firmware/Jlink: Fix double free when debug power-up fails (#780)
This commit is contained in:
parent
e1329499de
commit
7df314e265
|
@ -186,8 +186,6 @@ int jlink_swdp_scan(bmp_info_t *info)
|
||||||
|
|
||||||
jlink_adiv5_swdp_error(dp);
|
jlink_adiv5_swdp_error(dp);
|
||||||
adiv5_dp_init(dp);
|
adiv5_dp_init(dp);
|
||||||
if (!target_list)
|
|
||||||
free(dp);
|
|
||||||
return target_list?1:0;
|
return target_list?1:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,8 +82,6 @@ int adiv5_swdp_scan(void)
|
||||||
|
|
||||||
firmware_swdp_error(dp);
|
firmware_swdp_error(dp);
|
||||||
adiv5_dp_init(dp);
|
adiv5_dp_init(dp);
|
||||||
if (!target_list)
|
|
||||||
free(dp);
|
|
||||||
return target_list?1:0;
|
return target_list?1:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue