diff --git a/src/jtag/adapter.c b/src/jtag/adapter.c index 15b3ddc2c..37e6ee9ae 100644 --- a/src/jtag/adapter.c +++ b/src/jtag/adapter.c @@ -101,14 +101,15 @@ COMMAND_HANDLER(interface_transport_command) retval = CALL_COMMAND_HANDLER(transport_list_parse, &transports); if (retval != ERROR_OK) { return retval; + } retval = allow_transports(CMD_CTX, (const char **)transports); + if (retval != ERROR_OK) { for (unsigned i = 0; transports[i]; i++) free(transports[i]); free(transports); } - } return retval; }