This is an automated email from Gerrit.
Spencer Oliver ([email protected]) just uploaded a new patch set to Gerrit,
which you can find at http://openocd.zylin.com/1278
-- gerrit
commit c0cec456d50cc89ec9707793e50196d77f0758cb
Author: Andreas Fritiofson <andreas.fritiofson at gmail.com>
Date: Tue Mar 19 13:58:24 2013 +0000
ft2232: remove ft2232_large_scan memory leak
This is a very long outstanding issue see:
http://lists.berlios.de/pipermail/openocd-development/2011-June/019404.html
As this driver is deprecated the fix is added to purely to reduce the
warnings
reported by clang.
Change-Id: I3a16a704e0e8db27efda50fdcfdd35abf5ebed0f
Signed-off-by: Spencer Oliver <[email protected]>
diff --git a/src/jtag/drivers/ft2232.c b/src/jtag/drivers/ft2232.c
index 9a40ed9..1ac0b57 100644
--- a/src/jtag/drivers/ft2232.c
+++ b/src/jtag/drivers/ft2232.c
@@ -1107,6 +1107,11 @@ static int ft2232_large_scan(struct scan_command *cmd,
int retval;
int thisrun_read = 0;
+ if (!receive_buffer) {
+ LOG_ERROR("failed to allocate memory");
+ exit(-1);
+ }
+
if (cmd->ir_scan) {
LOG_ERROR("BUG: large IR scans are not supported");
exit(-1);
@@ -1272,6 +1277,8 @@ static int ft2232_large_scan(struct scan_command *cmd,
(int)bytes_read);
}
+ free(receive_buffer);
+
return ERROR_OK;
}
--
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel