diff options
author | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 11:04:40 +0000 |
---|---|---|
committer | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-04 11:04:40 +0000 |
commit | a6cf2a3e9f1d7b44dda39975139f5ae39524e363 (patch) | |
tree | b7801921812539d941386956f712973c5f6d31c8 /net/websockets/websocket_throttle.cc | |
parent | 60efa629c29f427201a69262f96e851756b110fa (diff) | |
download | chromium_src-a6cf2a3e9f1d7b44dda39975139f5ae39524e363.zip chromium_src-a6cf2a3e9f1d7b44dda39975139f5ae39524e363.tar.gz chromium_src-a6cf2a3e9f1d7b44dda39975139f5ae39524e363.tar.bz2 |
Fix memory leak in WebSocketThrottle.
TBR=yuzo, tyoshino
BUG=none
TEST=net_unittests no memory leak in WebSocketThrottleTest
Review URL: http://codereview.chromium.org/364001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30951 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/websockets/websocket_throttle.cc')
-rw-r--r-- | net/websockets/websocket_throttle.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/websockets/websocket_throttle.cc b/net/websockets/websocket_throttle.cc index fb320b6..d47d2e8 100644 --- a/net/websockets/websocket_throttle.cc +++ b/net/websockets/websocket_throttle.cc @@ -244,8 +244,10 @@ void WebSocketThrottle::RemoveFromQueue(SocketStream* socket, ConnectingQueue* queue = iter->second; DCHECK(state == queue->front()); queue->pop_front(); - if (queue->empty()) + if (queue->empty()) { + delete queue; addr_map_.erase(iter); + } } for (ConnectingQueue::iterator iter = queue_.begin(); iter != queue_.end(); |