platform_adiv5_swdp_scan: Do not double free with early errors.
adiv5_dp_init() clean up itself if errors happen
This commit is contained in:
parent
77025d4b6b
commit
e1329499de
|
@ -361,7 +361,6 @@ int platform_adiv5_swdp_scan(void)
|
|||
if (target_list)
|
||||
return 1;
|
||||
}
|
||||
free(dp);
|
||||
break;
|
||||
}
|
||||
case BMP_TYPE_CMSIS_DAP:
|
||||
|
@ -375,7 +374,6 @@ int platform_adiv5_swdp_scan(void)
|
|||
if (target_list)
|
||||
return 1;
|
||||
}
|
||||
free(dp);
|
||||
break;
|
||||
}
|
||||
case BMP_TYPE_JLINK:
|
||||
|
|
Loading…
Reference in New Issue