[sanitizer] move a pointer dereference after its null check
authorWu, Yingcong <yingcong.wu@intel.com>
Thu, 27 Apr 2023 01:56:30 +0000 (18:56 -0700)
committerVitaly Buka <vitalybuka@google.com>
Thu, 27 Apr 2023 01:59:17 +0000 (18:59 -0700)
commite1041ed5761c03bde830a2932c719901d43a8d7e
tree83d3fc745d6a21f0f4ab3ff4a11a654ccb245911
parent66f162a667bcb9b4a8940eb04083082f1d030ead
[sanitizer] move a pointer dereference after its null check

The dereference of pointer `ctx` is not protected by its null check, this could be problematic.

Reviewed By: vitalybuka, MaskRay

Differential Revision: https://reviews.llvm.org/D149011
compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc