range: move back files ownership in one case

In the case, we receive a range request with expected
overlap then new bytes, but the response does not get to the
new bytes, we are still skipping, but the HttpRangeContainerBlock
had the ownership of the files, and need to give it back
pull/6478/head
Philippe Antoine 3 years ago committed by Victor Julien
parent bba70607e8
commit 77604d86d6

@ -506,6 +506,11 @@ File *HttpRangeClose(HttpRangeContainerBlock *c, uint16_t flags)
} else if (c->toskip > 0) {
// was only an overlapping range, truncated before new bytes
SCLogDebug("c->toskip %" PRIu64, c->toskip);
if (c->files) {
// if we expected new bytes after overlap
c->container->files = c->files;
c->files = NULL;
}
return NULL;
} else {
// we just finished an in-order block

Loading…
Cancel
Save