summaryrefslogtreecommitdiff
path: root/builtin/help.c
diff options
context:
space:
mode:
authorRene Scharfe <l.s.r@web.de>2017-08-30 17:49:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-09-06 23:49:27 (GMT)
commitbad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c (patch)
treeee12091f4bc4b3bc675688e27bf0d8b6499eae0d /builtin/help.c
parent7246218667635252395debc8eff2304592cbd587 (diff)
downloadgit-bad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c.zip
git-bad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c.tar.gz
git-bad0e2c6a89b52b0d6b2ebae6e290b6d4e6f799c.tar.bz2
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 12fb489..b3f60a8 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);
}
}