aras-p / ClangBuildAnalyzer

Clang build analysis tool using -ftime-trace
The Unlicense
1.01k stars 65 forks source link

Fix a memory leak in BufferedWriter #65

Closed vitaut closed 3 years ago

vitaut commented 3 years ago

Fix a memory leak in BufferedWriter:

==2983106==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 88 byte(s) in 1 object(s) allocated from:
    #0 0xa6f3af in malloc
    #1 0x9b9134 in XXH_malloc .../xxHash/xxhash.h:755
    #2 0x9bc08d in XXH64_createState .../xxHash/xxhash.h:1689
    #3 0x44bb71 in BufferedWriter::BufferedWriter(_IO_FILE*) .../BuildEvents.cpp:443
    ...

which is caused by missing XXH64_freeState.