In the function ospf_lsa_translated_nssa_new the newly created lsa is lock however, the return lsa from ospf_lsa_new already has a lock. Therefore removing the addition lock resolve the leak below.
Direct leak of 640 byte(s) in 5 object(s) allocated from:
#0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
#2 0x561a16004f60 in ospf_lsa_new ../ospfd/ospf_lsa.c:186
#3 0x561a160051a1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:205
#4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
#5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
#6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
#7 0x561a16011cfb in ospf_translated_nssa_refresh ../ospfd/ospf_lsa.c:2152
#8 0x561a16014bb2 in ospf_external_lsa_install ../ospfd/ospf_lsa.c:2871
#9 0x561a1601596b in ospf_lsa_install ../ospfd/ospf_lsa.c:3076
#10 0x561a16168b3c in ospf_flood ../ospfd/ospf_flood.c:482
#11 0x561a160462f8 in ospf_ls_upd ../ospfd/ospf_packet.c:2115
#12 0x561a1604c66c in ospf_read_helper ../ospfd/ospf_packet.c:3198
#13 0x561a1604c88e in ospf_read ../ospfd/ospf_packet.c:3229
#14 0x7f294efd6c33 in event_call ../lib/event.c:1995
#15 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
#16 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
#17 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Direct leak of 640 byte(s) in 5 object(s) allocated from:
#0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
#2 0x561a16004f60 in ospf_lsa_new ../ospfd/ospf_lsa.c:186
#3 0x561a160051a1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:205
#4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
#5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
#6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
#7 0x561a16010e10 in ospf_translated_nssa_originate ../ospfd/ospf_lsa.c:2034
#8 0x561a16136559 in ospf_abr_translate_nssa ../ospfd/ospf_abr.c:668
#9 0x561a161383da in ospf_abr_process_nssa_translates ../ospfd/ospf_abr.c:968
#10 0x561a1613f9b8 in ospf_abr_nssa_task ../ospfd/ospf_abr.c:2054
#11 0x561a161402e5 in ospf_abr_task_timer ../ospfd/ospf_abr.c:2168
#12 0x7f294efd6c33 in event_call ../lib/event.c:1995
#13 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
#14 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
#15 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Indirect leak of 180 byte(s) in 5 object(s) allocated from:
#0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
#2 0x561a16005a43 in ospf_lsa_data_new ../ospfd/ospf_lsa.c:296
#3 0x561a160051b1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:206
#4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
#5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
#6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
#7 0x561a16011cfb in ospf_translated_nssa_refresh ../ospfd/ospf_lsa.c:2152
#8 0x561a16014bb2 in ospf_external_lsa_install ../ospfd/ospf_lsa.c:2871
#9 0x561a1601596b in ospf_lsa_install ../ospfd/ospf_lsa.c:3076
#10 0x561a16168b3c in ospf_flood ../ospfd/ospf_flood.c:482
#11 0x561a160462f8 in ospf_ls_upd ../ospfd/ospf_packet.c:2115
#12 0x561a1604c66c in ospf_read_helper ../ospfd/ospf_packet.c:3198
#13 0x561a1604c88e in ospf_read ../ospfd/ospf_packet.c:3229
#14 0x7f294efd6c33 in event_call ../lib/event.c:1995
#15 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
#16 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
#17 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
Indirect leak of 180 byte(s) in 5 object(s) allocated from:
#0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
#1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
#2 0x561a16005a43 in ospf_lsa_data_new ../ospfd/ospf_lsa.c:296
#3 0x561a160051b1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:206
#4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
#5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
#6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
#7 0x561a16010e10 in ospf_translated_nssa_originate ../ospfd/ospf_lsa.c:2034
#8 0x561a16136559 in ospf_abr_translate_nssa ../ospfd/ospf_abr.c:668
#9 0x561a161383da in ospf_abr_process_nssa_translates ../ospfd/ospf_abr.c:968
#10 0x561a1613f9b8 in ospf_abr_nssa_task ../ospfd/ospf_abr.c:2054
#11 0x561a161402e5 in ospf_abr_task_timer ../ospfd/ospf_abr.c:2168
#12 0x7f294efd6c33 in event_call ../lib/event.c:1995
#13 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
#14 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
#15 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58