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

Re: [PATCH] repository: prevent memory leak when releasing ref stores

From
Sven Strickroth <email@cs-ware.de>
Date
Aug 5, 2024, 15:50 UTC
Message-ID
<8594c7bb-07ed-4c54-8712-5b0d4299b8eb@cs-ware.de>
In-Reply-To
<pull.1758.git.git.1722855364436.gitgitgadget@gmail.com>
Am 05.08.2024 um 12:56 schrieb Sven Strickroth via GitGitGadget:
Show 6 quoted lines
> -	strmap_for_each_entry(&repo->submodule_ref_stores, &iter, e)
> +	strmap_for_each_entry(&repo->submodule_ref_stores, &iter, e) {
>   		ref_store_release(e->value);
> +		free(e->value);
> +	}
>   	strmap_clear(&repo->submodule_ref_stores, 1);

After further checking this does not seem to be necessary. The ref stores are already free'd in strmap_clear.

-- 
Best regards,
  Sven Strickroth
  PGP key id F5A9D4C4 @ any key-server
Previous: Sven Strickroth via GitGitGadgetNext: Junio C Hamano
Message 2 of 7 in “repository: prevent memory leak when releasing ref stores”
  1. repository: prevent memory leak when releasing ref storesSven Strickroth via GitGitGadget, Aug 5, 2024
  2. Sven StrickrothAug 5, 2024
  3. Junio C HamanoAug 5, 2024
  4. Junio C HamanoAug 5, 2024
  5. Junio C HamanoAug 5, 2024
  6. Patrick SteinhardtAug 6, 2024
  7. Junio C HamanoAug 6, 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.