http2: range: check return value when opening

HttpRangeContainerOpenFile can return NULL
so, http2_range_open can set file_range to NULL
And we should check this before calling http2_range_close
pull/6433/head
Philippe Antoine 4 years ago committed by Victor Julien
parent 65a6f61004
commit 8e8899c90c

@ -224,7 +224,7 @@ impl HTTP2Transaction {
match range::http2_parse_content_range(&value) {
Ok((_, v)) => {
range::http2_range_open(self, &v, flow, sfcm, flags, decompressed);
if over {
if over && self.file_range != std::ptr::null_mut() {
range::http2_range_close(self, files, flags, &[])
}
}

Loading…
Cancel
Save