[all-commits] [llvm/llvm-project] b00fc5: Fix Mem leak in LLVMTargetMachine.cpp
XinWang10 via All-commits
all-commits at lists.llvm.org
Wed Apr 12 02:27:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b00fc5ac995b982909e685439f3d5cef86b4bed6
https://github.com/llvm/llvm-project/commit/b00fc5ac995b982909e685439f3d5cef86b4bed6
Author: Wang, Xin10 <xin10.wang at intel.com>
Date: 2023-04-12 (Wed, 12 Apr 2023)
Changed paths:
M llvm/lib/CodeGen/LLVMTargetMachine.cpp
Log Message:
-----------
Fix Mem leak in LLVMTargetMachine.cpp
If we go to line 302, with one of MCE or MAB is not nullptr, then we could
leak mem here.
Use unique_ptr to maintain these 2 pointer can avoid it.
Reviewed By: LuoYuanke
Differential Revision: https://reviews.llvm.org/D148003
More information about the All-commits
mailing list