Pau Espin Pedrol has submitted this change and it was merged. (
https://gerrit.osmocom.org/12077 )
Change subject: radioInterface: Fix memleak during close()
......................................................................
radioInterface: Fix memleak during close()
destructors of pointers created through "new" must be destroyed manually
through "delete".
Change-Id: I10d37579f16bec89cc762f200a8951218305c708
---
M Transceiver52M/radioInterface.cpp
1 file changed, 8 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
Harald Welte: Looks good to me, approved
diff --git a/Transceiver52M/radioInterface.cpp
b/Transceiver52M/radioInterface.cpp
index 6245cfc..f488b0d 100644
--- a/Transceiver52M/radioInterface.cpp
+++ b/Transceiver52M/radioInterface.cpp
@@ -75,6 +75,14 @@
void RadioInterface::close()
{
+ for (std::vector<RadioBuffer*>::iterator it = sendBuffer.begin(); it !=
sendBuffer.end(); ++it)
+ delete *it;
+ for (std::vector<RadioBuffer*>::iterator it = recvBuffer.begin(); it !=
recvBuffer.end(); ++it)
+ delete *it;
+ for (std::vector<short*>::iterator it = convertSendBuffer.begin(); it !=
convertSendBuffer.end(); ++it)
+ delete[] *it;
+ for (std::vector<short*>::iterator it = convertRecvBuffer.begin(); it !=
convertRecvBuffer.end(); ++it)
+ delete[] *it;
sendBuffer.resize(0);
recvBuffer.resize(0);
convertSendBuffer.resize(0);
--
To view, visit https://gerrit.osmocom.org/12077
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I10d37579f16bec89cc762f200a8951218305c708
Gerrit-Change-Number: 12077
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Pau Espin Pedrol <[email protected]>
Gerrit-CC: Vadim Yanitskiy <[email protected]>