entry.c: mark file-local function static
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index d14a575e8e2670247bf8c296e28cf0146e3e03bb..aad4b3977a2960bac1391b4b3ec8afe814308902 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -3823,11 +3823,13 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
        if (start_command(&child) != 0 ||
            strbuf_read(&buf, child.out, 0) < 0 ||
            finish_command(&child) != 0) {
+               close(child.out);
                strbuf_release(&buf);
                remove_tempfile();
                error("error running textconv command '%s'", pgm);
                return NULL;
        }
+       close(child.out);
        remove_tempfile();
 
        return strbuf_detach(&buf, outsize);