Skip to content

Commit 7246218

Browse files
rscharfegitster
authored andcommitted
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>
1 parent a981a9f commit 7246218

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/help.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
170170
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
171171
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
172172
warning(_("failed to exec '%s'"), cmd);
173+
strbuf_release(&shell_cmd);
173174
}
174175

175176
static void add_man_viewer(const char *name)

0 commit comments

Comments
 (0)