diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:27:56 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 17:27:56 +0000 |
commit | 32a7ea645ed0fc1679728d14d0aaf73ff5a3bebe (patch) | |
tree | b32e35926ec0c2b055ba9ac8e5828a645de397fc | |
parent | 912a59afa6f473674e6b746363004a641e993ab2 (diff) | |
download | chromium_src-32a7ea645ed0fc1679728d14d0aaf73ff5a3bebe.zip chromium_src-32a7ea645ed0fc1679728d14d0aaf73ff5a3bebe.tar.gz chromium_src-32a7ea645ed0fc1679728d14d0aaf73ff5a3bebe.tar.bz2 |
Linux: don't leak file descriptors in the sandbox host.
(This patch appeared to me, fully formed, in my sleep)
BUG=16426
http://codereview.chromium.org/149678
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20742 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/render_sandbox_host_linux.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/render_sandbox_host_linux.cc b/chrome/browser/renderer_host/render_sandbox_host_linux.cc index 2724e00..f2dd374 100644 --- a/chrome/browser/renderer_host/render_sandbox_host_linux.cc +++ b/chrome/browser/renderer_host/render_sandbox_host_linux.cc @@ -232,6 +232,9 @@ class SandboxIPCProcess : public WebKitClient { } SendRendererReply(fds, reply, result_fd); + + if (result_fd >= 0) + close(result_fd); } void HandleGetFontFamilyForChars(int fd, Pickle& pickle, void* iter, |