Merge remote-tracking branch 'origin/fix-ue-mem-leaks' into integration_2025_w41 (!3689)

Fix OAI UE memory leaks

Fix 1: Replaced asn1cFreeStruc with ASN_STRUCT_FREE in MAC layer to properly
       free nested ASN.1 structures in cell group configuration.
Fix 2: Removed premature nullification of dedicatedNAS_Message->buf in
       dlInformationTransfer processing to allow proper ASN.1 cleanup.
Fix 3: Fixed memory ownership in nr_rrc_process_dedicatedNAS_MessageList by
       copying OCTET_STRING data instead of transferring ownership, preventing
       ASN.1 cleanup from losing track of allocated memory

Closes #828
This commit is contained in:
Jaroslava Fiedlerova
2025-10-07 14:33:15 +02:00
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ void process_msg_rcc_to_mac(nr_mac_rrc_message_t *msg, int instance_id)
break;
case NR_MAC_RRC_CONFIG_CG:
nr_rrc_mac_config_req_cg(instance_id, 0, msg->payload.config_cg.cellGroupConfig, msg->payload.config_cg.UE_NR_Capability);
asn1cFreeStruc(asn_DEF_NR_CellGroupConfig, msg->payload.config_cg.cellGroupConfig);
ASN_STRUCT_FREE(asn_DEF_NR_CellGroupConfig, msg->payload.config_cg.cellGroupConfig);
break;
case NR_MAC_RRC_CONFIG_MIB:
nr_rrc_mac_config_req_mib(instance_id,