]> git.ipfire.org Git - thirdparty/git.git/commitdiff
help: release strbuf on error return in exec_woman_emacs()
authorRene Scharfe <l.s.r@web.de>
Wed, 30 Aug 2017 17:49:46 +0000 (19:49 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 6 Sep 2017 23:49:27 +0000 (08:49 +0900)
Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/help.c

index 12fb48933e7529207c953890902236b3217dfac9..b3f60a8f30b39e9731fcde08600c900b2f772acb 100644 (file)
@@ -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);
        }
 }