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 <andreas.fritiofson@gmail.com> Reviewed-on: http://openocd.zylin.com/1667 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
d96010ae71
commit
85830c32bf
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue