Fix export_marks() error handling.
[gitweb.git] / diff.c
diff --git a/diff.c b/diff.c
index d24bff1e465d5b5e486ab461bd0548387736f109..f0b580c1503147d093d928915ead2c5f88a0042b 100644 (file)
--- a/diff.c
+++ b/diff.c
@@ -3590,6 +3590,7 @@ 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) {
+               strbuf_release(&buf);
                remove_tempfile();
                error("error running textconv command '%s'", pgm);
                return NULL;