From: Rene Scharfe Date: Wed, 30 Aug 2017 17:49:46 GMT Subject: [PATCH 15/34] help: release strbuf on error return in exec_woman_emacs() Message-ID: <20170830175005.20756-16-l.s.r@web.de> In-Reply-To: <20170830175005.20756-1-l.s.r@web.de> Signed-off-by: Rene Scharfe --- builtin/help.c | 1 + 1 file changed, 1 insertion(+) diff --git a/builtin/help.c b/builtin/help.c index 12fb48933e..b3f60a8f30 100644 --- a/builtin/help.c +++ b/builtin/help.c @@ -123,14 +123,15 @@ static int check_emacsclient_version(void) static void exec_woman_emacs(const char *path, const char *page) { if (!check_emacsclient_version()) { /* This works only with emacsclient version >= 22. */ struct strbuf man_page = STRBUF_INIT; if (!path) path = "emacsclient"; 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); } } -- 2.14.1