Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: net/socket/client_socket_pool_base.cc

Issue 9226011: Fix a use-after free in socket pool which can happen after reaching the maxium number of sockets. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/client_socket_pool_base.cc
diff --git a/net/socket/client_socket_pool_base.cc b/net/socket/client_socket_pool_base.cc
index 113985a4d4fc20d3484edb3462881f7d49c1e7be..6b2a75d64362766ee59502d1dd6f9e27699ca9df 100644
--- a/net/socket/client_socket_pool_base.cc
+++ b/net/socket/client_socket_pool_base.cc
@@ -386,6 +386,11 @@ int ClientSocketPoolBaseHelper::RequestSocketInternal(
return ERR_IO_PENDING;
}
} while (ReachedMaxSocketsLimit());
+
+ // It is possible that CloseOneIdleConnectionInLayeredPool() has deleted
+ // our Group (see http://crbug.com/109876), so look it up again
+ // to be safe.
+ group = GetOrCreateGroup(group_name);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698