From 85830c32bfa3159cf05ba7619bf32c1c43db7f2e Mon Sep 17 00:00:00 2001 From: Andreas Fritiofson Date: Sat, 28 Sep 2013 16:31:06 +0200 Subject: [PATCH] jtag/tcl: Avoid casting away const Here, in_value == out_value, so free the non-const one. Change-Id: I017ad9e7519711ac0c9da79265be7daaa846f356 Signed-off-by: Andreas Fritiofson Reviewed-on: http://openocd.zylin.com/1667 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/jtag/tcl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jtag/tcl.c b/src/jtag/tcl.c index fb060f9a7..b95bf7566 100644 --- a/src/jtag/tcl.c +++ b/src/jtag/tcl.c @@ -205,7 +205,7 @@ static int Jim_Command_drscan(Jim_Interp *interp, int argc, Jim_Obj *const *args Jim_GetLong(interp, args[i], &bits); str = buf_to_str(fields[field_count].in_value, bits, 16); - free((void *)fields[field_count].out_value); + free(fields[field_count].in_value); Jim_ListAppendElement(interp, list, Jim_NewStringObj(interp, str, strlen(str))); free(str);