]> git.ipfire.org Git - thirdparty/squid.git/commit
Fix BodyPipe/Sink memory leaks associated with auto-consumption (#348) M-staged-PR348
authorAlex Rousskov <rousskov@measurement-factory.com>
Tue, 8 Jan 2019 15:14:18 +0000 (15:14 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 8 Jan 2019 23:01:21 +0000 (23:01 +0000)
commitb599471b7536024b6bf083a78769ae351f27adea
tree26374feca13fd7d8d3b7cff2c44cc36fa98d2c68
parent6b9c8755c675ac60ed04b7b3bc16b8b747f48d1e
Fix BodyPipe/Sink memory leaks associated with auto-consumption (#348)

Auto-consumption happens (and could probably leak memory) in many cases,
but this leak was exposed by an eCAP service that blocked or replaced
virgin messages.

The BodySink job termination algorithm relies on body production
notifications. A BodySink job created after the body production had
ended can never stop and, hence, leaks (leaking the associated BodyPipe
object with it). Such a job is also useless:  If production is over,
there is no need to free space for more body data!  This change avoids
creating such leaking and useless jobs.
src/BodyPipe.cc
src/BodyPipe.h