summaryrefslogtreecommitdiff
path: root/builtin/commit.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2023-10-01 21:40:21 -0500
committerJunio C Hamano <gitster@pobox.com>2023-10-02 14:57:39 -0700
commitac45d995f3329e5a7e85bf103bd94b48107b3803 (patch)
tree608e333533654e38717c41de52b4b7d831f53360 /builtin/commit.c
parentc8762c30df5b5c0a2a91e14e77cfc94b459d089b (diff)
object-file-convert: don't leak when converting tag objects
Upon close examination I discovered that while brian's code to convert tag objects was functionally correct, it leaked memory. Rearrange the code so that all error checking happens before any memory is allocated. Add code to release the temporary strbufs the code uses. The code pretty much assumes the tag object ends with a newline, so add an explict test to verify that is the case. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit.c')
0 files changed, 0 insertions, 0 deletions