]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'jk/hash-algo-leak-fixes'
authorJunio C Hamano <gitster@pobox.com>
Fri, 17 Jul 2026 06:05:46 +0000 (23:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 17 Jul 2026 06:05:47 +0000 (23:05 -0700)
commite47f7de7de4b0d78afd46f5f35bb4fcbe5d92003
treebeded5e3905def63eb28768b76ea95410bca8dd2
parent62c9cec6967af7c95366f4aa3c34c6625c72d351
parent600588d2aa4e3311ee476f89cd57a622ed8bf0ec
Merge branch 'jk/hash-algo-leak-fixes'

Various code paths that initialize a cryptographic hash context but
bail out or finish without calling 'git_hash_final()' have been taught
to call 'git_hash_discard()' to release allocated resources, fixing
memory leaks when Git is built with non-default backends like
'OpenSSL' or 'libgcrypt'.

* jk/hash-algo-leak-fixes:
  hash: add platform-specific discard functions
  hash: fix memory leak copying sha256 gcrypt handles
  http: discard hash in dumb-http http_object_request
  check_stream_oid(): discard hash on read error
  patch-id: discard hash when done
  csum-file: provide a function to release checkpoints
  csum-file: always finalize or discard hash
  hash: add discard primitive
  csum-file: drop discard_hashfile()
builtin/fast-import.c
csum-file.c
csum-file.h
diff.c
http.c
http.h
object-file.c