Skip to content

Commit 802f9c9

Browse files
j6tgitster
authored andcommitted
diff.c: plug a memory leak in an error path
Signed-off-by: Johannes Sixt <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3ef67cf commit 802f9c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

diff.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3590,6 +3590,7 @@ static char *run_textconv(const char *pgm, struct diff_filespec *spec,
35903590
if (start_command(&child) != 0 ||
35913591
strbuf_read(&buf, child.out, 0) < 0 ||
35923592
finish_command(&child) != 0) {
3593+
strbuf_release(&buf);
35933594
remove_tempfile();
35943595
error("error running textconv command '%s'", pgm);
35953596
return NULL;

0 commit comments

Comments
 (0)