Commit dbdd326a authored by Sorin Jianu's avatar Sorin Jianu Committed by Commit Bot

Fix NetworkFetcherWinHTTP memory leak.

The |write_data_callback_| holds a reference to the object, and the
object leaks due to the circular dependency.

TBR: waffles@chromium.org
Bug: 1088295
Change-Id: Ia897432681221abb07686be124a5e89409813095
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2224162Reviewed-by: default avatarSorin Jianu <sorin@chromium.org>
Commit-Queue: Sorin Jianu <sorin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#773564}
parent bb2b3b7e
......@@ -57,6 +57,9 @@ NetworkFetcherWinHTTP::NetworkFetcherWinHTTP(const HINTERNET& session_handle)
NetworkFetcherWinHTTP::~NetworkFetcherWinHTTP() = default;
void NetworkFetcherWinHTTP::Close() {
// |write_data_callback_| maintains an outstanding reference to this object
// and the reference must be released to avoid leaking the object.
write_data_callback_.Reset();
request_handle_.reset();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment