diff options
author | Patrick Steinhardt <ps@pks.im> | 2024-08-14 08:52:53 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-08-14 19:08:01 +0200 |
commit | 0aaca0ec099139f12df6d66cfa09a27ec85106cc (patch) | |
tree | 99930bd14e2ea93a6d09b04c7d28fb86a938ec01 /t/t4030-diff-textconv.sh | |
parent | userdiff: fix leaking memory for configured diff drivers (diff) | |
download | git-0aaca0ec099139f12df6d66cfa09a27ec85106cc.tar.xz git-0aaca0ec099139f12df6d66cfa09a27ec85106cc.zip |
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>
Diffstat (limited to '')
-rwxr-xr-x | t/t4030-diff-textconv.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/t/t4030-diff-textconv.sh b/t/t4030-diff-textconv.sh index a39a626664..29f6d610c2 100755 --- a/t/t4030-diff-textconv.sh +++ b/t/t4030-diff-textconv.sh @@ -1,6 +1,8 @@ #!/bin/sh test_description='diff.*.textconv tests' + +TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh find_diff() { |