[ASan] turn on leak checking for ASan tests and fix a few discovered leaks

llvm-svn: 190274
diff --git a/compiler-rt/lib/lit.common.unit.configured.in b/compiler-rt/lib/lit.common.unit.configured.in
index 88eeed1..430816b 100644
--- a/compiler-rt/lib/lit.common.unit.configured.in
+++ b/compiler-rt/lib/lit.common.unit.configured.in
@@ -8,6 +8,7 @@
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.compiler_rt_src_root = "@COMPILER_RT_SOURCE_DIR@"
 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
+config.host_os = "@HOST_OS@"
 
 # LLVM tools dir and build mode can be passed in lit parameters,
 # so try to apply substitution.