diff options
author | Wu, Yingcong <yingcong.wu@intel.com> | 2023-03-01 19:08:00 +0530 |
---|---|---|
committer | Shivam Gupta <Shivam.Gupta2@amd.com> | 2023-03-01 19:09:11 +0530 |
commit | 17718a2cff7d4e09811260dfcb0577b82bf3fe7f (patch) | |
tree | eaceb9f31f311cf73069ddf04c9c28371aa7a845 /clang/unittests/libclang/LibclangTest.cpp | |
parent | 81979c3038defe8653b62ba05517ee6d6b3eb976 (diff) | |
download | llvm-17718a2cff7d4e09811260dfcb0577b82bf3fe7f.zip llvm-17718a2cff7d4e09811260dfcb0577b82bf3fe7f.tar.gz llvm-17718a2cff7d4e09811260dfcb0577b82bf3fe7f.tar.bz2 |
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
Diffstat (limited to 'clang/unittests/libclang/LibclangTest.cpp')
0 files changed, 0 insertions, 0 deletions