Commit 7028f538 authored by Liviu Ionescu's avatar Liviu Ionescu Committed by Matthias Welwarsky
Browse files

target/target.c: free semihosting member



When destroying the target, if the semihosting
pointer is set, free it.

Change-Id: I07d34918bb3fddab1eee11219dd66f4842708ec1
Signed-off-by: default avatarLiviu Ionescu <ilg@livius.net>
Reviewed-on: http://openocd.zylin.com/4552


Tested-by: jenkins
Reviewed-by: default avatarTomas Vanek <vanekt@fbl.cz>
parent ebf2d733
......@@ -1893,6 +1893,9 @@ static void target_destroy(struct target *target)
if (target->type->deinit_target)
target->type->deinit_target(target);
if (target->semihosting)
free(target->semihosting);
jtag_unregister_event_callback(jtag_enable_callback, target);
struct target_event_action *teap = target->event_action;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment