[package] rtorrent add missing patch after update
[openwrt/svn-archive/archive.git] / net / rtorrent / patches / 010-fix_exec_capture_leak.patch
1 # Fixes a file handle leak in the execute_capture functions.
2 Index: rtorrent/src/rpc/exec_file.cc
3 ===================================================================
4 --- rtorrent/src/rpc/exec_file.cc (revision 1093)
5 +++ rtorrent/src/rpc/exec_file.cc (working copy)
6 @@ -123,6 +123,8 @@
7 m_capture += std::string(buffer, length);
8 } while (length > 0);
9
10 + ::close(pipeFd[0]);
11 +
12 if (m_logFd != -1) {
13 write(m_logFd, "Captured output:\n", sizeof("Captured output:\n"));
14 write(m_logFd, m_capture.data(), m_capture.length());