notes: Initialise variable to appease gcc
[gitweb.git] / run-command.c
index eb5c57562909c1e505c2a7688bad6dbeea4b96a0..c7793f50fbe0a43495c2b2d36a47c0b5aac37483 100644 (file)
@@ -383,6 +383,8 @@ int start_command(struct child_process *cmd)
                        close(cmd->out);
                if (need_err)
                        close_pair(fderr);
+               else if (cmd->err)
+                       close(cmd->err);
                errno = failed_errno;
                return -1;
        }