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:
Uwe Bonnes 2020-11-28 21:29:20 +01:00 committed by UweBonnes
parent 77025d4b6b
commit e1329499de
1 changed files with 0 additions and 2 deletions

View File

@ -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: