]> git.ipfire.org Git - thirdparty/git.git/commit
diff-no-index: release strbuf on queue error
authorRené Scharfe <l.s.r@web.de>
Wed, 7 Sep 2022 11:36:53 +0000 (13:36 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Sep 2022 19:33:28 +0000 (12:33 -0700)
commitfffe7d81a402ced9ede961f55cfc617fe08e71ef
tree59b1f236c95aa73021281e83f24014db63484cb1
parentac8035a2affdf30f2c691ad760826d955bba0507
diff-no-index: release strbuf on queue error

The strbuf is small and we are about to exit, so we could leave its
cleanup to the OS.  If we release it explicitly at all, however, then we
should do it on early exit as well.  Move the strbuf_release call to a
new cleanup section at the end and make sure all execution paths go
through it.

Suggested-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
diff-no-index.c