Change in simtrace2[master]: cardem: Fix memory leak on unsupported SIMTRACE_MSGT_DT_CEMU_CARDINSERT

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Sat Dec 14 23:00:21 UTC 2019


laforge has submitted this change. ( https://gerrit.osmocom.org/c/simtrace2/+/16585 )

Change subject: cardem: Fix memory leak on unsupported SIMTRACE_MSGT_DT_CEMU_CARDINSERT
......................................................................

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
---
M firmware/libcommon/source/mode_cardemu.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c
index 704e6ba..1669c2d 100644
--- a/firmware/libcommon/source/mode_cardemu.c
+++ b/firmware/libcommon/source/mode_cardemu.c
@@ -505,6 +505,7 @@
 		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,

-- 
To view, visit https://gerrit.osmocom.org/c/simtrace2/+/16585
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: simtrace2
Gerrit-Branch: master
Gerrit-Change-Id: I489097b7e332004e0f2beca0b22fa36d5d1d31b5
Gerrit-Change-Number: 16585
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191214/e0af5b48/attachment.htm>


More information about the gerrit-log mailing list