diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-24 23:10:32 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-24 23:10:32 +0000 |
commit | c690a1841132bc82bceda221c30c9526ec7527bf (patch) | |
tree | f79aacd1b1210f2c675fc924703f25d015ba42dc /chrome/common | |
parent | e8c63e50dd64e8037fcd46e3e0fb6db1d08489ad (diff) | |
download | chromium_src-c690a1841132bc82bceda221c30c9526ec7527bf.zip chromium_src-c690a1841132bc82bceda221c30c9526ec7527bf.tar.gz chromium_src-c690a1841132bc82bceda221c30c9526ec7527bf.tar.bz2 |
Fix some leaks in the syncchannel unittest.
TBR=darin
Review URL: http://codereview.chromium.org/8170
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3963 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/ipc_sync_channel_unittest.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/common/ipc_sync_channel_unittest.cc b/chrome/common/ipc_sync_channel_unittest.cc index decd6b6..1d28b06 100644 --- a/chrome/common/ipc_sync_channel_unittest.cc +++ b/chrome/common/ipc_sync_channel_unittest.cc @@ -484,7 +484,9 @@ class RecursiveClient : public Worker { msg->EnableMessagePumping(); bool result = Send(msg); DCHECK(result != close_channel_); - if (!close_channel_) { + if (close_channel_) { + delete reply_msg; + } else { SyncChannelTestMsg_Double::WriteReplyParams(reply_msg, in * 2); Send(reply_msg); } @@ -493,6 +495,7 @@ class RecursiveClient : public Worker { void OnAnswerDelay(Message* reply_msg) { if (close_channel_) { + delete reply_msg; CloseChannel(); } else { SyncChannelTestMsg_AnswerToLife::WriteReplyParams(reply_msg, 42); |