@matheusbsbs / matheus-bagliano / commits / 802f9c9cb2
Fork 0

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>

Johannes Sixt committed Jun 8, 2009 at 22:34 UTC 802f9c9cb21321d3ffe7576e01bbe31c51bd4c70
1 file changed +1
diff.c
+1
@@ -3590,6 +3590,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
3590 if (start_command(&child) != 0 ||
3591 strbuf_read(&buf, child.out, 0) < 0 ||
3592 finish_command(&child) != 0) {
3593 + strbuf_release(&buf);
3594 remove_tempfile();
3595 error("error running textconv command '%s'", pgm);
3596 return NULL;