aboutsummaryrefslogtreecommitdiff
path: root/src/target.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/target.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/target.c')
-rw-r--r--src/target.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/target.c b/src/target.c
index 5189929..a28c55f 100644
--- a/src/target.c
+++ b/src/target.c
@@ -42,6 +42,8 @@ void target_list_free(void)
target *t = target_list->next;
if (target_list->destroy_callback)
target_list->destroy_callback(target_list);
+ if (target_list->priv)
+ target_list->priv_free(target_list->priv);
while (target_list->commands) {
tc = target_list->commands->next;
free(target_list->commands);