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.

BUG=chromium:378809
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.

Change-Id: I55429de6c495e8fe21e09abbae2ae8738035ae93
Reviewed-on: https://chromium-review.googlesource.com/203491
Tested-by: Alex Deymo <deymo@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
2 files changed