Add missing free(3) for the malloc(3) call.
Detected on NetBSD with LSan.
Differential D67330
Avoid memory leak in ASan test krytarowski on Sep 8 2019, 8:49 AM. Authored by
Details Add missing free(3) for the malloc(3) call. Detected on NetBSD with LSan.
Diff Detail
Event TimelineComment Actions ================================================================= ==371==ERROR: LeakSanitizer: detected memory leaks Direct leak of 10 byte(s) in 1 object(s) allocated from: #0 0x80f57b2 in malloc /public/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145:3 #1 0x812088a in main /public/compiler-rt/test/asan/TestCases/inline.cpp:14:28 #2 0x806480b in ___start (/public/llvm-build/projects/compiler-rt/test/asan/I386NetBSDConfig/TestCases/Output/inline.cpp.tmp+0x806480b) SUMMARY: AddressSanitizer: 10 byte(s) leaked in 1 allocation(s) |