Skip to content

Commit f31f1d3

Browse files
rscharfegitster
authored andcommitted
convert: release strbuf on error return in filter_buffer_or_fd()
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent f139929 commit f31f1d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

convert.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,10 @@ static int filter_buffer_or_fd(int in, int out, void *data)
423423
child_process.in = -1;
424424
child_process.out = out;
425425

426-
if (start_command(&child_process))
426+
if (start_command(&child_process)) {
427+
strbuf_release(&cmd);
427428
return error("cannot fork to run external filter '%s'", params->cmd);
429+
}
428430

429431
sigchain_push(SIGPIPE, SIG_IGN);
430432

0 commit comments

Comments
 (0)