[compiler-rt] [compiler-rt][profile] Duplicate filename in `parseAndSetFilename` if exists (PR #110264)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 03:14:17 PDT 2024
================
@@ -923,6 +925,9 @@ static void parseAndSetFilename(const char *FilenamePat,
PROF_NOTE("Override old profile path \"%s\" via %s to \"%s\" via %s.\n",
OldFilenamePat, getPNSStr(OldPNS), lprofCurFilename.FilenamePat,
getPNSStr(PNS));
+
+ free(OldFilenamePat);
----------------
antoniofrighetto wrote:
Right, I recall checking that this was not the case within the first early return, but definitely would be in the second one, thanks. Releasing the allocation on both of them.
https://github.com/llvm/llvm-project/pull/110264
More information about the llvm-commits
mailing list