]> git.sur5r.net Git - openocd/commitdiff
hla/hla_interface: call HLA layout API close() on quit
authorPaul Fertser <fercerpav@gmail.com>
Wed, 11 Feb 2015 08:04:15 +0000 (11:04 +0300)
committerPaul Fertser <fercerpav@gmail.com>
Mon, 9 Mar 2015 06:40:50 +0000 (06:40 +0000)
This bug was exposed by Valgrind.

Change-Id: I2e2bc036b49ca3ff22f78f765ee4537763350096
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Reviewed-on: http://openocd.zylin.com/2543
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/jtag/hla/hla_interface.c

index 21cd06fa733da9b37eac286c954d90864045a7cf..85f083cecda1d928c97ae51598f11d9600668552 100644 (file)
@@ -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;
 }