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

Unified Diff: chrome/common/ipc_sync_channel_unittest.cc

Issue 8170: Fix some leaks in the syncchannel unittest. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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: chrome/common/ipc_sync_channel_unittest.cc
===================================================================
--- chrome/common/ipc_sync_channel_unittest.cc (revision 3934)
+++ chrome/common/ipc_sync_channel_unittest.cc (working copy)
@@ -484,7 +484,9 @@
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 @@
void OnAnswerDelay(Message* reply_msg) {
if (close_channel_) {
+ delete reply_msg;
CloseChannel();
} else {
SyncChannelTestMsg_AnswerToLife::WriteReplyParams(reply_msg, 42);
« 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