]> git.ipfire.org Git - thirdparty/git.git/commit
builtin/log: fix leaking branch name when creating cover letters
authorPatrick Steinhardt <ps@pks.im>
Thu, 1 Aug 2024 10:38:16 +0000 (12:38 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 1 Aug 2024 15:47:35 +0000 (08:47 -0700)
commit7935a026130f7dd430539685de0742dabb8e6047
treefb4ece83f6931f040bf68b2be1e07c39e964e492
parent34968e56de472fa864641abefbaf4a4923b77507
builtin/log: fix leaking branch name when creating cover letters

When calling `make_cover_letter()` without a branch name, we try to
derive the branch name by calling `find_branch_name()`. But while this
function returns an allocated string, we never free the result and thus
have a memory leak. Fix this.

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