summaryrefslogtreecommitdiffstats
path: root/net/socket
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-02 00:28:39 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-02 00:28:39 +0000
commit8024ddc635ee8ce349a49de249a737e130233021 (patch)
tree676382102bdfb2245dead8a3dc69a346902ac07f /net/socket
parent6bc6f19e869f7cbbc3222b387be501067fe6ec23 (diff)
downloadchromium_src-8024ddc635ee8ce349a49de249a737e130233021.zip
chromium_src-8024ddc635ee8ce349a49de249a737e130233021.tar.gz
chromium_src-8024ddc635ee8ce349a49de249a737e130233021.tar.bz2
Fix leak on connection error.
BUG=none TEST=none Review URL: http://codereview.chromium.org/150196 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19792 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket')
-rw-r--r--net/socket/client_socket_pool_base.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 56eb1ab..2a32e4d 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -303,7 +303,7 @@ void ClientSocketPoolBase::OnConnectJobComplete(int result, ConnectJob* job) {
request_map->erase(it);
DCHECK_EQ(handle, job->key_handle());
- ClientSocket* const socket = job->ReleaseSocket();
+ scoped_ptr<ClientSocket> socket(job->ReleaseSocket());
RemoveConnectJob(job->key_handle());
if (result != OK) {
@@ -312,7 +312,7 @@ void ClientSocketPoolBase::OnConnectJobComplete(int result, ConnectJob* job) {
// |group_map_| again.
MaybeOnAvailableSocketSlot(group_name);
} else {
- HandOutSocket(socket, false /* not reused */, handle, &group);
+ HandOutSocket(socket.release(), false /* not reused */, handle, &group);
callback->Run(result);
}
}