]> git.ipfire.org Git - thirdparty/git.git/commit
object-file: fix leak on conversion failure
authorEric Wong <e@80x24.org>
Sat, 22 Jun 2024 04:36:48 +0000 (04:36 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Jun 2024 16:07:21 +0000 (09:07 -0700)
commit493fdae0464282fbac99f60d94bfaabf5559c9ff
treee1353167ea74077cd0e6864d238f64ac55fc01d9
parent786a3e4b8d754d2b14b1208b98eeb0a554ef19a8
object-file: fix leak on conversion failure

I'm not sure exactly how to trigger the leak, but it seems fairly
obvious that the `content' buffer should be freed even if
convert_object_file() fails.  Noticed while working in this area
on unrelated things.

Signed-off-by: Eric Wong <e@80x24.org>
Acked-by: Derrick Stolee <stolee@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
object-file.c