Skip to content

Commit

Permalink
diff.c: plug a memory leak in an error path
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Johannes Sixt authored and Junio C Hamano committed Jun 9, 2009
1 parent 3ef67cf commit 802f9c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions diff.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 802f9c9

Please sign in to comment.