From 889b246d939bf8572094cf4bfe56f58f44e8ff62 Mon Sep 17 00:00:00 2001 From: Paul Fertser Date: Wed, 11 Feb 2015 11:04:15 +0300 Subject: [PATCH] hla/hla_interface: call HLA layout API close() on quit This bug was exposed by Valgrind. Change-Id: I2e2bc036b49ca3ff22f78f765ee4537763350096 Signed-off-by: Paul Fertser Reviewed-on: http://openocd.zylin.com/2543 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/jtag/hla/hla_interface.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/jtag/hla/hla_interface.c b/src/jtag/hla/hla_interface.c index 21cd06fa..85f083ce 100644 --- a/src/jtag/hla/hla_interface.c +++ b/src/jtag/hla/hla_interface.c @@ -124,6 +124,9 @@ static int hl_interface_quit(void) } hl_if.param.trace_source_hz = 0; + if (hl_if.layout->api->close) + hl_if.layout->api->close(hl_if.handle); + return ERROR_OK; } -- 2.39.5