Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 20:49:45 +0300
committerJunio C Hamano <gitster@pobox.com>2017-09-07 02:49:27 +0300
commit7246218667635252395debc8eff2304592cbd587 (patch)
treee773e6777eae16347debbc2166ced620f9f1c4fa /builtin/help.c
parenta981a9f0e7fb0d2a65fc3c4532fdfc38cc275c48 (diff)
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>
Diffstat (limited to 'builtin/help.c')
-rw-r--r--builtin/help.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/help.c b/builtin/help.c
index 991a8bb16c..12fb48933e 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -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)