[all-commits] [llvm/llvm-project] 17718a: Move close() to the proper else block
Wu Yingcong via All-commits
all-commits at lists.llvm.org
Wed Mar 1 05:46:07 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 17718a2cff7d4e09811260dfcb0577b82bf3fe7f
https://github.com/llvm/llvm-project/commit/17718a2cff7d4e09811260dfcb0577b82bf3fe7f
Author: Wu, Yingcong <yingcong.wu at intel.com>
Date: 2023-03-01 (Wed, 01 Mar 2023)
Changed paths:
M compiler-rt/lib/xray/xray_profiling.cpp
Log Message:
-----------
Move close() to the proper else block
`LogWriter::Close(LW)` is outside the null check if-else block, which, when `LW == nullptr`, will causing a NULL dereference.
I think the close() means to be in else block, which is when `LW != nullptr`.
Reviewed By: xgupta
Differential Revision: https://reviews.llvm.org/D145039
More information about the All-commits
mailing list