From 32a7ea645ed0fc1679728d14d0aaf73ff5a3bebe Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Wed, 15 Jul 2009 17:27:56 +0000 Subject: 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 --- chrome/browser/renderer_host/render_sandbox_host_linux.cc | 3 +++ 1 file changed, 3 insertions(+) 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, -- cgit v1.1