From: Johannes Sixt Date: Mon, 8 Jun 2009 20:34:30 +0000 (+0200) Subject: diff.c: plug a memory leak in an error path X-Git-Tag: v1.6.3.3~17 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/802f9c9cb21321d3ffe7576e01bbe31c51bd4c70?ds=inline diff.c: plug a memory leak in an error path Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- diff --git a/diff.c b/diff.c index d24bff1e46..f0b580c150 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;