]> git.sur5r.net Git - openocd/commitdiff
jtag: Fix memory leaks in jtag_tap_free()
authorAndreas Fritiofson <andreas.fritiofson@gmail.com>
Wed, 30 Jul 2014 21:18:41 +0000 (23:18 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 7 Jan 2015 23:23:01 +0000 (23:23 +0000)
Change-Id: I953fbb346fbf168fb50b349d245f2aa64dbfdcb3
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
Reviewed-on: http://openocd.zylin.com/2234
Tested-by: jenkins
src/jtag/core.c

index f82b05e1e36a4890109964dfddd8489ef75237b4..44aed30ade6b5fecd5128f9fa53a737a6b51457c 100644 (file)
@@ -1326,9 +1326,10 @@ void jtag_tap_free(struct jtag_tap *tap)
 {
        jtag_unregister_event_callback(&jtag_reset_callback, tap);
 
-       /** @todo is anything missing? no memory leaks please */
        free(tap->expected);
+       free(tap->expected_mask);
        free(tap->expected_ids);
+       free(tap->cur_instr);
        free(tap->chip);
        free(tap->tapname);
        free(tap->dotted_name);