aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/AST/ByteCode/Interp.cpp
diff options
context:
space:
mode:
authorgbMattN <matthew.nagy@sony.com>2025-05-28 14:51:50 +0100
committerGitHub <noreply@github.com>2025-05-28 14:51:50 +0100
commit2b1ebef8b8a5af7092de80daafd2743683d0e8c8 (patch)
treec549ce853986ffdf38c00339549f1118ad637242 /clang/lib/AST/ByteCode/Interp.cpp
parent0ebe5557d9688f7397d45facb26efcd3f2c3bc8c (diff)
downloadllvm-2b1ebef8b8a5af7092de80daafd2743683d0e8c8.zip
llvm-2b1ebef8b8a5af7092de80daafd2743683d0e8c8.tar.gz
llvm-2b1ebef8b8a5af7092de80daafd2743683d0e8c8.tar.bz2
Fixed small memory leak in libprofile (#141739)
Inside `getCurFilename`, there is this code snippit ``` if (!lprofCurFilename.FilenamePat || !lprofCurFilename.FilenamePat[0]) return 0; ``` If this is true, we return `"\0"`, but would leak the memory in `FilenameBuf`. This pull request adds a free before then to properly free the memory. There was already a check that we allocated memory, so there is no need to worry about freeing unallocated memory.
Diffstat (limited to 'clang/lib/AST/ByteCode/Interp.cpp')
0 files changed, 0 insertions, 0 deletions