cardem: Fix memory leak on unsupported SIMTRACE_MSGT_DT_CEMU_CARDINSERT

Some boards like QMOD cannot simulate a virtual card insert signal
towards the modem (as the mPCIe connector doesn't have that signal).

In these situations, we were aborting processing of the related OUT
endpoint command and forgot to release the related memory.

Change-Id: I489097b7e332004e0f2beca0b22fa36d5d1d31b5
Related: OS#4251
This commit is contained in:
Harald Welte
2019-12-14 23:23:36 +01:00
parent 60118315cc
commit 56be0bf317

View File

@@ -505,6 +505,7 @@ static void dispatch_usb_command_cardem(struct msgb *msg, struct cardem_inst *ci
if (!ci->pin_insert.pio) {
TRACE_INFO("%u: skipping unsupported card_insert to %s\r\n",
ci->num, cardins->card_insert ? "INSERTED" : "REMOVED");
usb_buf_free(msg);
break;
}
TRACE_INFO("%u: set card_insert to %s\r\n", ci->num,