]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/log: fix leak when showing converted blob contents
authorPatrick Steinhardt <ps@pks.im>
Wed, 14 Aug 2024 06:52:53 +0000 (08:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 14 Aug 2024 17:08:01 +0000 (10:08 -0700)
commit0aaca0ec099139f12df6d66cfa09a27ec85106cc
tree99930bd14e2ea93a6d09b04c7d28fb86a938ec01
parent38678e5df55b77e98b47e7847faf83451eb161de
builtin/log: fix leak when showing converted blob contents

In `show_blob_object()`, we proactively call `textconv_object()`. In
case we have a textconv driver for this blob we will end up showing the
converted contents, otherwise we'll show the un-converted contents of it
instead.

When the object has been converted we never free the buffer containing
the converted contents. Fix this to plug this memory leak.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/log.c
t/t4030-diff-textconv.sh