From e3c88d3cb709e6b7fc64b95a9eb28d1f37bd0b9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arnim=20L=C3=A4uger?= Date: Sat, 24 May 2008 11:58:28 +0000 Subject: [PATCH] add missing malloc for cable_params in usbblaster_connect() git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1250 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/src/tap/cable/usbblaster.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jtag/src/tap/cable/usbblaster.c b/jtag/src/tap/cable/usbblaster.c index 64951678..93ef1c75 100644 --- a/jtag/src/tap/cable/usbblaster.c +++ b/jtag/src/tap/cable/usbblaster.c @@ -67,6 +67,13 @@ usbblaster_connect( char *params[], cable_t *cable ) params_t *cable_params; int result; + cable_params = (params_t *)malloc( sizeof(params_t) ); + if (!cable_params) + { + free( cable ); + return 4; + } + /* perform generic_usbconn_connect */ result = generic_usbconn_connect( params, cable );