From 8b6bd61c2c7ce8985fe94d8e4c6c95e19665e16f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Tue, 8 Dec 2020 10:28:40 -0800 Subject: [PATCH] Close forgotten channel Reviewed By: jvillard Differential Revision: D25398947 fbshipit-source-id: 2383c4923 --- infer/src/IR/inferconfig.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/infer/src/IR/inferconfig.ml b/infer/src/IR/inferconfig.ml index 70de39071..33070dc10 100644 --- a/infer/src/IR/inferconfig.ml +++ b/infer/src/IR/inferconfig.ml @@ -74,8 +74,7 @@ module FileContainsStringMatcher = struct hence we read the file twice to check if it doesn't contain regexp_not *) Option.value_map regexp_not_opt ~default:true ~f:(fun regexp_not -> - let file_in = In_channel.create path in - not (loop regexp_not file_in) ) + Utils.with_file_in path ~f:(fun file_in -> not (loop regexp_not file_in)) ) let create_matcher (s_patterns : contains_pattern list) =