summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJohannes Sixt <j6t@kdbg.org>2009-06-08 20:34:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-09 04:19:26 (GMT)
commit802f9c9cb21321d3ffe7576e01bbe31c51bd4c70 (patch)
tree93506b2aefa006962cf64389b92885c8da767f20 /diff.c
parent3ef67cf250b14b9c62b2bd21e4d0d5339f5f31e5 (diff)
downloadgit-802f9c9cb21321d3ffe7576e01bbe31c51bd4c70.zip
git-802f9c9cb21321d3ffe7576e01bbe31c51bd4c70.tar.gz
git-802f9c9cb21321d3ffe7576e01bbe31c51bd4c70.tar.bz2
diff.c: plug a memory leak in an error path
Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index d24bff1..f0b580c 100644
--- 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;