diff --git a/src/shrpx_config.cc b/src/shrpx_config.cc index a1a20b70..94cb1227 100644 --- a/src/shrpx_config.cc +++ b/src/shrpx_config.cc @@ -1129,6 +1129,8 @@ int read_tls_sct_from_dir(std::vector &dst, const StringRef &opt, return -1; } + auto closer = defer(close, fd); + // 2 bytes length field for this SCT. auto len_idx = std::distance(std::begin(dst), std::end(dst)); dst.insert(std::end(dst), 2, 0);