Commit 132d7a38 authored by aligungr's avatar aligungr

NAS/RRC memory leak fix

parent 7bc0d097
...@@ -16,6 +16,7 @@ namespace nas ...@@ -16,6 +16,7 @@ namespace nas
struct InformationElement struct InformationElement
{ {
virtual ~InformationElement() = default;
}; };
struct InformationElement1 : InformationElement struct InformationElement1 : InformationElement
......
...@@ -83,6 +83,9 @@ struct NasMessage ...@@ -83,6 +83,9 @@ struct NasMessage
protected: protected:
NasMessage() = default; NasMessage() = default;
public:
virtual ~NasMessage() = default;
}; };
struct SmMessage : NasMessage struct SmMessage : NasMessage
......
...@@ -126,6 +126,7 @@ void UeRrcTask::receiveRrcSetup(int cellId, const ASN_RRC_RRCSetup &msg) ...@@ -126,6 +126,7 @@ void UeRrcTask::receiveRrcSetup(int cellId, const ASN_RRC_RRCSetup &msg)
m_initialNasPdu = {}; m_initialNasPdu = {};
sendRrcMessage(pdu); sendRrcMessage(pdu);
asn::Free(asn_DEF_ASN_RRC_UL_DCCH_Message, pdu);
m_logger->info("RRC connection established"); m_logger->info("RRC connection established");
switchState(ERrcState::RRC_CONNECTED); switchState(ERrcState::RRC_CONNECTED);
......
...@@ -57,6 +57,7 @@ void UeRrcTask::deliverUplinkNas(uint32_t pduId, OctetString &&nasPdu) ...@@ -57,6 +57,7 @@ void UeRrcTask::deliverUplinkNas(uint32_t pduId, OctetString &&nasPdu)
asn::SetOctetString(*c1.choice.ulInformationTransfer->dedicatedNAS_Message, nasPdu); asn::SetOctetString(*c1.choice.ulInformationTransfer->dedicatedNAS_Message, nasPdu);
sendRrcMessage(pdu); sendRrcMessage(pdu);
asn::Free(asn_DEF_ASN_RRC_UL_DCCH_Message, pdu);
} }
void UeRrcTask::receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTransfer &msg) void UeRrcTask::receiveDownlinkInformationTransfer(const ASN_RRC_DLInformationTransfer &msg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment