diff options
author | hawk@chromium.org <hawk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 23:35:39 +0000 |
---|---|---|
committer | hawk@chromium.org <hawk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-25 23:35:39 +0000 |
commit | 9808ca4e09f14c674584ab82e6c9cb85abab610f (patch) | |
tree | 45913565e2a12a009bc9b9b08ecf3c4b871a5463 /ipc/ipc_channel_posix.cc | |
parent | b5ac72f9cc7c836a923ab81be80a6e3913498a9d (diff) | |
download | chromium_src-9808ca4e09f14c674584ab82e6c9cb85abab610f.zip chromium_src-9808ca4e09f14c674584ab82e6c9cb85abab610f.tar.gz chromium_src-9808ca4e09f14c674584ab82e6c9cb85abab610f.tar.bz2 |
Fix reads and writes to freed memory in Channel::ChannelImpl::OnFileCanReadWithoutBlocking()
BUG=22451
TEST=valgrind should no longer report the freed write error in the UtilityProcessHostTest.ExtensionUnpacker test
Review URL: http://codereview.chromium.org/207050
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27289 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ipc/ipc_channel_posix.cc')
-rw-r--r-- | ipc/ipc_channel_posix.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc index 24d11f4..ac238ba 100644 --- a/ipc/ipc_channel_posix.cc +++ b/ipc/ipc_channel_posix.cc @@ -905,6 +905,8 @@ void Channel::ChannelImpl::OnFileCanReadWithoutBlocking(int fd) { if (!ProcessIncomingMessages()) { Close(); listener_->OnChannelError(); + // The OnChannelError() call may delete this, so we need to exit now. + return; } } |