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>
Rene Scharfe committed
Aug 30, 2017 at 19:49 UTC
f31f1d395131f84acbee14f42af8f702bca14468
1 file changed
+3
-1
convert.c
+3
-1
@@ -423,8 +423,10 @@ static int filter_buffer_or_fd(int in, int out, void *data)
423
child_process.in = -1;
424
child_process.out = out;
425
426
- if (start_command(&child_process))
426
+ if (start_command(&child_process)) {
427
+ strbuf_release(&cmd);
428
return error("cannot fork to run external filter '%s'", params->cmd);
429
+ }
430
431
sigchain_push(SIGPIPE, SIG_IGN);
432