]> git.ipfire.org Git - thirdparty/git.git/commit
gpg-interface: fix misdesigned signing key interfaces
authorPatrick Steinhardt <ps@pks.im>
Thu, 5 Sep 2024 10:09:07 +0000 (12:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 5 Sep 2024 15:49:11 +0000 (08:49 -0700)
commitb8849e236f7a32d43ab3ba087587a336d69329b0
tree6b1df61ebb81e62c9ce99caf9312dafb01e5acb7
parent49d47eb5416d22f185877a57380a1ffc28f172e1
gpg-interface: fix misdesigned signing key interfaces

The interfaces to retrieve signing keys and their IDs are misdesigned as
they return string constants even though they indeed allocate memory,
which leads to memory leaks. Refactor the code to instead always return
allocated strings and let the callers free them accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/tag.c
commit.c
gpg-interface.c
gpg-interface.h
send-pack.c
t/t5534-push-signed.sh