git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] read-cache: two small leak fixes

From
Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 30, 2024, 11:40 UTC
Message-ID
<pull.1801.git.1727696424.gitgitgadget@gmail.com>

I found these two small memory leaks while investigating things involving the index. I thought they were small enough to send independently.

I initially wrote this as two patches because the second patch was more involved to work around the "cleanup" label, and my branch was based on 2.46.1. This code has changed recently due to d1c53f6703 (read-cache: fix leaking hashfile when writing index fails, 2024-08-14), so now the second patch is simpler and these could probably be merged into one.

Thanks, -Stolee
Derrick Stolee (2):
  read-cache: free threaded memory pool
  read-cache: free hash context in do_write_index()
 read-cache.c | 2 ++
 1 file changed, 2 insertions(+)
base-commit: 6258f68c3c1092c901337895c864073dcdea9213
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1801%2Fderrickstolee%2Fleaks-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1801/derrickstolee/leaks-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1801
-- 
gitgitgadget
Next: Derrick Stolee via GitGitGadget
Message 1 of 11 in “read-cache: two small leak fixes”
  1. 0/2 read-cache: two small leak fixesDerrick Stolee via GitGitGadget, Sep 30, 2024
  2. 1/2 read-cache: free threaded memory poolDerrick Stolee via GitGitGadget, Sep 30, 2024
  3. Patrick SteinhardtSep 30, 2024
  4. Derrick StoleeOct 1, 2024
  5. Patrick SteinhardtOct 1, 2024
  6. 2/2 read-cache: free hash context in do_write_index()Derrick Stolee via GitGitGadget, Sep 30, 2024
  7. Patrick SteinhardtSep 30, 2024
  8. Derrick StoleeOct 1, 2024
  9. Patrick SteinhardtOct 1, 2024
  10. read-cache: free threaded memory poolDerrick Stolee via GitGitGadget, Oct 1, 2024
  11. Patrick SteinhardtOct 2, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.