summaryrefslogtreecommitdiffstats
path: root/contrib/persistent-https
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-11 11:20:52 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-11 13:15:07 -0700
commit4806c55c86f7cc45f60a7ff5d757874072265deb (patch)
tree911fbcb67b1edc0e2de8a98904fc32c561e6f8ce /contrib/persistent-https
parent1e5c1601f98afba0772c4548ec6befe6e97761e7 (diff)
downloadgit-4806c55c86f7cc45f60a7ff5d757874072265deb.tar.gz
git-4806c55c86f7cc45f60a7ff5d757874072265deb.zip
apply: fix leaking string in `match_fragment()`
Before calling `update_pre_post_images()`, we call `strbuf_detach()` to put its buffer into a new string variable that we then pass to that function. Besides being rather pointless, it also causes us to leak memory of that variable because we never free it. Get rid of the variable altogether and instead reach into the `strbuf` directly. While at it, refactor the code to have a common exit path and mark string that do not contain allocated memory as constant. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/persistent-https')
0 files changed, 0 insertions, 0 deletions