Fix cmd/cable.c malloc issue (Hartley Sweeten)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1257 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Kolja Waschk 17 years ago
parent 47d85b3d35
commit d68367420f

@ -1,3 +1,8 @@
2008-05-28 Kolja Waschk <kawk>
* src/tap/cable/generic_parport.c: Fix cmd/cable.c malloc issue
(Hartley Sweeten)
2008-05-27 Arnim Laeuger <arniml@users.sourceforge.net>
* UrJTAG.txt: document progress option of svf command

@ -50,7 +50,7 @@ print_vector(int len, char *vec)
int
generic_parport_connect( char *params[], cable_t *cable )
{
generic_params_t *cable_params = malloc( sizeof *cable_params );
generic_params_t *cable_params;
parport_t *port;
int i;
@ -72,11 +72,12 @@ generic_parport_connect( char *params[], cable_t *cable )
port = parport_drivers[i]->connect( (const char **) &params[2],
cmd_params( params ) - 2 );
if (port == NULL) {
printf( _("Error: Cable connection failed!\n") );
return 3;
}
if (port == NULL) {
printf( _("Error: Cable connection failed!\n") );
return 3;
}
cable_params = malloc( sizeof *cable_params );
if (!cable_params) {
free( cable_params );
free( cable );

Loading…
Cancel
Save