Browse Source

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>
maint
Rene Scharfe 8 years ago committed by Junio C Hamano
parent
commit
7246218667
  1. 1
      builtin/help.c

1
builtin/help.c

@ -170,6 +170,7 @@ static void exec_man_cmd(const char *cmd, const char *page) @@ -170,6 +170,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
warning(_("failed to exec '%s'"), cmd);
strbuf_release(&shell_cmd);
}

static void add_man_viewer(const char *name)

Loading…
Cancel
Save