http_server: Fixed memory leak on unittest code.
Two P2PHTttpServer tests (ReportServerMessageTest and
MultipleConnections) create ConnectionDelegates using the
FakeConnectionDelegate class. The real implementation deletes itself
(delete this;) when Run() is done, since we don't track which
ConnectionDelegates are still running.
The FakeConnectionDelegate didn't have this delete, leaking that
memory on the tests that used Construct(). This leak existed only
in unittest code.
TEST=ASAN_OPTIONS="detect_leaks=1" USE="clang asan" FEATURES="test" \
emerge-amd64-generic p2p passes.
TEST=Added log message before the added "delete this" to check correlation with the leak.
Tested-by: Alex Deymo <firstname.lastname@example.org>
Reviewed-by: David Zeuthen <email@example.com>
Reviewed-by: Yunlian Jiang <firstname.lastname@example.org>
Commit-Queue: Alex Deymo <email@example.com>
2 files changed