• Guido Casati's avatar
    Fix memory leak in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message · aa8cf7c4
    Guido Casati authored
    * bcch_message is malloced by ASN.1 decoder and needs to be always freed after use along with its contents
    
    > Direct leak of 64 byte(s) in 1 object(s) allocated from:
       >0 0x7ffff74b4a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
       >1 0x555557737ecd in SEQUENCE_decode_uper /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/constr_SEQUENCE_uper.c:37
       >2 0x555557746f81 in uper_decode /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:83
       >3 0x5555577471fe in uper_decode_complete /cmake_targets/ran_build/build/openair2/RRC/LTE/MESSAGES/uper_decoder.c:16
       >4 0x555556f8b1c9 in nr_rrc_ue_decode_NR_BCCH_DL_SCH_Message /openair2/RRC/NR_UE/rrc_UE.c:732
       >5 0x555556fbc365 in rrc_nrue /openair2/RRC/NR_UE/rrc_UE.c:1775
       >6 0x555556fc4c2e in rrc_nrue_task /openair2/RRC/NR_UE/rrc_UE.c:1718
       >7 0x7ffff5e94ac2 in start_thread nptl/pthread_create.c:442
    aa8cf7c4
rrc_UE.c 101 KB