diff --git a/src/target/adiv5.c b/src/target/adiv5.c index 1cea5aff631..fcbb8740b0c 100644 --- a/src/target/adiv5.c +++ b/src/target/adiv5.c @@ -994,6 +994,7 @@ void adiv5_dp_init(adiv5_debug_port_s *const dp) */ if (target->priv_free == cortex_priv_free && cortex_ap(target) == ap && strstr(target->driver, "Tiva") != NULL) { + adiv5_ap_unref(ap); adiv5_dp_unref(dp); return; }