jtag/drivers/ulink: fix clang static analyzer warning
scan-build-9: Description: Potential leak of memory pointed to by 'tdo_buffer' File: src/jtag/drivers/ulink.c Line: 1629 Free the buffer before error return. Change-Id: Ic47651a5ae78c7a47ae4fcbad225f329b14c45cb Signed-off-by: Tomas Vanek <vanekt@fbl.cz> Reviewed-on: http://openocd.zylin.com/5519 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Oleksij Rempel <linux@rempel-privat.de>
This commit is contained in:
parent
46f077aa00
commit
c064440162
|
@ -1627,6 +1627,7 @@ int ulink_queue_scan(struct ulink *device, struct jtag_command *cmd)
|
||||||
|
|
||||||
if (ret != ERROR_OK) {
|
if (ret != ERROR_OK) {
|
||||||
free(tdi_buffer_start);
|
free(tdi_buffer_start);
|
||||||
|
free(tdo_buffer_start);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue