From: Rene Scharfe Date: Wed, 30 Aug 2017 17:49:40 +0000 (+0200) Subject: convert: release strbuf on error return in filter_buffer_or_fd() X-Git-Tag: v2.15.0-rc0~78^2~25 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/f31f1d395131f84acbee14f42af8f702bca14468 convert: release strbuf on error return in filter_buffer_or_fd() Signed-off-by: Rene Scharfe Signed-off-by: Junio C Hamano --- diff --git a/convert.c b/convert.c index c5f0b21037..4a0ed8d3cb 100644 --- a/convert.c +++ b/convert.c @@ -423,8 +423,10 @@ static int filter_buffer_or_fd(int in, int out, void *data) child_process.in = -1; child_process.out = out; - if (start_command(&child_process)) + if (start_command(&child_process)) { + strbuf_release(&cmd); return error("cannot fork to run external filter '%s'", params->cmd); + } sigchain_push(SIGPIPE, SIG_IGN);