nghttpx: Fix file descriptor leak in read_tls_sct_from_dir
This commit is contained in:
parent
5b9cacc2d7
commit
3a831fa95c
|
@ -1129,6 +1129,8 @@ int read_tls_sct_from_dir(std::vector<uint8_t> &dst, const StringRef &opt,
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto closer = defer(close, fd);
|
||||||
|
|
||||||
// 2 bytes length field for this SCT.
|
// 2 bytes length field for this SCT.
|
||||||
auto len_idx = std::distance(std::begin(dst), std::end(dst));
|
auto len_idx = std::distance(std::begin(dst), std::end(dst));
|
||||||
dst.insert(std::end(dst), 2, 0);
|
dst.insert(std::end(dst), 2, 0);
|
||||||
|
|
Loading…
Reference in New Issue