summaryrefslogtreecommitdiff
path: root/builtin/help.c
diff options
context:
space:
mode:
authorLibravatar Rene Scharfe <l.s.r@web.de>2017-08-30 19:49:46 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-09-07 08:49:27 +0900
commitbad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c (patch)
treeee12091f4bc4b3bc675688e27bf0d8b6499eae0d /builtin/help.c
parenthelp: release strbuf on error return in exec_man_man() (diff)
downloadtgif-bad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c.tar.xz
help: release strbuf on error return in exec_woman_emacs()
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 12fb48933e..b3f60a8f30 100644
--- a/builtin/help.c
+++ b/builtin/help.c
@@ -131,6 +131,7 @@ static void exec_woman_emacs(const char *path, const char *page)
strbuf_addf(&man_page, "(woman \"%s\")", page);
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
warning_errno(_("failed to exec '%s'"), path);
+ strbuf_release(&man_page);
}
}