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>
This commit is contained in:
Rene Scharfe 2017-08-30 19:49:46 +02:00 committed by Junio C Hamano
parent 7246218667
commit bad0e2c6a8

View File

@ -131,6 +131,7 @@ static void exec_woman_emacs(const char *path, const char *page)
strbuf_addf(&man_page, "(woman \"%s\")", page); strbuf_addf(&man_page, "(woman \"%s\")", page);
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL); execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
warning_errno(_("failed to exec '%s'"), path); warning_errno(_("failed to exec '%s'"), path);
strbuf_release(&man_page);
} }
} }