summaryrefslogtreecommitdiffstats
path: root/chrome/common/ipc_sync_channel_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/ipc_sync_channel_unittest.cc')
-rw-r--r--chrome/common/ipc_sync_channel_unittest.cc5
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);