Disable LeakSanitizer for xdisplaycheck.

Prevent memory leaks in xdisplaycheck from interfering with LSan bots.


Review URL: https://chromiumcodereview.appspot.com/19962006

Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: f00788c82a5fbf7348a61cf7871fad8977cae463
diff --git a/xdisplaycheck.cc b/xdisplaycheck.cc
index ea5fe1e..8c432d1 100644
--- a/xdisplaycheck.cc
+++ b/xdisplaycheck.cc
@@ -106,3 +106,10 @@
   return 0;
+#if defined(LEAK_SANITIZER)
+// XOpenDisplay leaks memory if it takes more than one try to connect. This
+// causes LSan bots to fail. We don't care about memory leaks in xdisplaycheck
+// anyway, so just disable LSan completely.
+extern "C" int __lsan_is_turned_off() { return 1; }