This is an automated email from Gerrit. Andreas Fritiofson ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/1498
-- gerrit commit e44bea84214c5ea13f766f956a655fdb936cb671 Author: Andreas Fritiofson <[email protected]> Date: Wed Jul 10 11:06:26 2013 +0200 ftdi: Fix error in calloc retval check Found by clang. Change-Id: Iaa952b063779f4d392d8bdc62a3e7ce9daef2740 Signed-off-by: Andreas Fritiofson <[email protected]> diff --git a/src/jtag/drivers/ftdi.c b/src/jtag/drivers/ftdi.c index 20969c0..11a7414 100644 --- a/src/jtag/drivers/ftdi.c +++ b/src/jtag/drivers/ftdi.c @@ -127,8 +127,10 @@ static struct signal *create_signal(const char *name) psig = &(*psig)->next; *psig = calloc(1, sizeof(**psig)); - if (*psig) - (*psig)->name = strdup(name); + if (*psig == NULL) + return NULL; + + (*psig)->name = strdup(name); if ((*psig)->name == NULL) { free(*psig); *psig = NULL; -- ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
