Fix direct leak in rrc_gNB_send_NGAP_NAS_FIRST_REQ

Free memory allocated in NGAP after use in RRC.

 Direct leak of 29 byte(s) in 1 object(s) allocated from:
    > #0 0x7f11200b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    > #1 0x558b7fcd0137 in malloc_or_fail /n2-handover-preparation/common/utils/utils.h:86
    > #2 0x558b7fcd0137 in create_byte_array /n2-handover-preparation/common/utils/ds/byte_array.c:32
    > #3 0x558b7fdb7a5c in rrc_gNB_send_NGAP_NAS_FIRST_REQ /n2-handover-preparation/openair2/RRC/NR/rrc_gNB_NGAP.c:183
    > #4 0x558b7fd2ab30 in rrc_gNB_process_RRCSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:439
    > #5 0x558b7fd2ab30 in handle_rrcSetupComplete /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1715
    > #6 0x558b7fd63e23 in rrc_gNB_decode_dcch /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:1851
    > #7 0x558b7fd8b4c3 in rrc_gnb_task /n2-handover-preparation/openair2/RRC/NR/rrc_gNB.c:2718
    > #8 0x7f111ea94ac2 in start_thread nptl/pthread_create.c:442
This commit is contained in:
Guido Casati
2025-06-09 20:43:44 +02:00
parent 114f833a77
commit a06457bab6
+1
View File
@@ -313,6 +313,7 @@ void *ngap_gNB_process_itti_msg(void *notUsed) {
case NGAP_NAS_FIRST_REQ:
ngap_gNB_handle_nas_first_req(instance, &NGAP_NAS_FIRST_REQ(received_msg));
free_byte_array(NGAP_NAS_FIRST_REQ(received_msg).nas_pdu);
break;
case NGAP_UPLINK_NAS: