help: release strbuf on error return in exec_man_man()
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
7246218667635252395debc8eff2304592cbd587
1 file changed
+1
builtin/help.c
+1
@@ -170,6 +170,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
170
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
171
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
172
warning(_("failed to exec '%s'"), cmd);
173
+ strbuf_release(&shell_cmd);
174
}
175
176
static void add_man_viewer(const char *name)