aboutsummaryrefslogtreecommitdiff
path: root/src/adiv5_jtagdp.c
diff options
context:
space:
mode:
authorGareth McMullin2012-07-05 19:23:28 +1200
committerGareth McMullin2012-07-05 19:23:28 +1200
commit00c4dbfb11e389176bdb2d45a262eb47229cd80b (patch)
treefcd39820419eaece7a4a8a5ed81fefc1702bac66 /src/adiv5_jtagdp.c
parentaf1ef670ba50a29546fa165f159f66fe5d2d0868 (diff)
ADIv5 AP and DP are now allocated on the heap and reference counted.
They are unref'd and free'd automatically when the target list is destroyed.
Diffstat (limited to 'src/adiv5_jtagdp.c')
-rw-r--r--src/adiv5_jtagdp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/adiv5_jtagdp.c b/src/adiv5_jtagdp.c
index e85462b..68bcddd 100644
--- a/src/adiv5_jtagdp.c
+++ b/src/adiv5_jtagdp.c
@@ -49,7 +49,7 @@ static uint32_t adiv5_jtagdp_low_access(ADIv5_DP_t *dp, uint8_t APnDP, uint8_t R
void adiv5_jtag_dp_handler(jtag_dev_t *dev)
{
- ADIv5_DP_t *dp = (void*)calloc(1, sizeof(ADIv5_DP_t));
+ ADIv5_DP_t *dp = (void*)calloc(1, sizeof(*dp));
dp->dev = dev;
dp->idcode = dev->idcode;