Stop leaking the /dev/null fd after spawning a subprocess.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 7 May 2021 15:57:38 +0000 (17:57 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 7 May 2021 15:57:38 +0000 (17:57 +0200)
httpinput.cpp

index 8d443c7d069214369af7020d258555aeeb6e3379..62ed663611402cef5d4517cef00d8033300391bc 100644 (file)
@@ -276,6 +276,7 @@ int HTTPInput::open_child_process(const string &cmdline)
        free(argv[0]);
        free(argv[1]);
        free(argv[2]);
+       close(devnullfd);
        close(pipefd[1]);
 
        if (err == 0) {