I found that there were multiple memory leak locations in clfow. In symbol.c:92, rc.c:97, linked-list.c:23, linked-list.c:35, linked-list.c:45, parser.c:1261,
they’re all using xmalloc().
Indirect leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x495b6d in malloc (/data/clean/cflow/cflow-1.6/src/cflow+0x495b6d)
#1 0x512b84 in xmalloc /data/clean/cflow/cflow-1.6/gnu/xmalloc.c:43:13
#2 0x4d79f5 in linked_list_create /data/clean/cflow/cflow-1.6/src/linked-list.c:35:33
#3 0x4e77ab in add_reference /data/clean/cflow/cflow-1.6/src/parser.c:1265:19
#4 0x4e3bba in reference /data/clean/cflow/cflow-1.6/src/parser.c:1292:19
#5 0x4e38e7 in _expression_ /data/clean/cflow/cflow-1.6/src/parser.c:621:7
#6 0x4e6bf8 in func_body /data/clean/cflow/cflow-1.6/src/parser.c:1051:9
#7 0x4e3625 in parse_variable_declaration /data/clean/cflow/cflow-1.6/src/parser.c:781:4
#8 0x4e2de9 in parse_declaration /data/clean/cflow/cflow-1.6/src/parser.c:580:4
#9 0x4e2d21 in yyparse /data/clean/cflow/cflow-1.6/src/parser.c:528:9
#10 0x4d9615 in main /data/clean/cflow/cflow-1.6/src/main.c:812:7
#11 0x7f16a81e783f in __libc_start_main /build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:291
Indirect leak of 16 byte(s) in 1 object(s) allocated from:
#0 0x495b6d in malloc (/data/clean/cflow/cflow-1.6/src/cflow+0x495b6d)
#1 0x512b84 in xmalloc /data/clean/cflow/cflow-1.6/gnu/xmalloc.c:43:13
#2 0x4e769a in add_reference /data/clean/cflow/cflow-1.6/src/parser.c:1261:15
#3 0x4e39da in call /data/clean/cflow/cflow-1.6/src/parser.c:1276:11
#4 0x4e38cd in _expression_ /data/clean/cflow/cflow-1.6/src/parser.c:618:7
#5 0x4e6bf8 in func_body /data/clean/cflow/cflow-1.6/src/parser.c:1051:9
#6 0x4e3625 in parse_variable_declaration /data/clean/cflow/cflow-1.6/src/parser.c:781:4
#7 0x4e2de9 in parse_declaration /data/clean/cflow/cflow-1.6/src/parser.c:580:4
#8 0x4e2d21 in yyparse /data/clean/cflow/cflow-1.6/src/parser.c:528:9
#9 0x4d9615 in main /data/clean/cflow/cflow-1.6/src/main.c:812:7
#10 0x7f16a81e783f in __libc_start_main /build/glibc-e6zv40/glibc-2.23/csu/../csu/libc-start.c:291
SUMMARY: AddressSanitizer: 22160 byte(s) leaked in 613 allocation(s).