[PATCH] D84747: [BPI] Fix memory leak reported by sanitizer bots
Evgeniy via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 28 05:52:49 PDT 2020
ebrevnov created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
ebrevnov requested review of this revision.
There is a silly mistake where release() is used instead of reset() for free resources of unique pointer.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D84747
Files:
llvm/lib/Analysis/BranchProbabilityInfo.cpp
Index: llvm/lib/Analysis/BranchProbabilityInfo.cpp
===================================================================
--- llvm/lib/Analysis/BranchProbabilityInfo.cpp
+++ llvm/lib/Analysis/BranchProbabilityInfo.cpp
@@ -1178,7 +1178,7 @@
PostDominatedByUnreachable.clear();
PostDominatedByColdCall.clear();
- SccI.release();
+ SccI.reset();
if (PrintBranchProb &&
(PrintBranchProbFuncName.empty() ||
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84747.281203.patch
Type: text/x-patch
Size: 421 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200728/d3d210ad/attachment.bin>
More information about the llvm-commits
mailing list