From: Junio C Hamano <gitster@pobox.com>
To: Sven Strickroth <email@cs-ware.de>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>,
Sven Strickroth via GitGitGadget <gitgitgadget@gmail.com>
Subject: Re: [PATCH] repository: prevent memory leak when releasing ref stores
Date: Mon, 05 Aug 2024 10:42:01 -0700 [thread overview]
Message-ID: <xmqqa5hq3lzq.fsf@gitster.g> (raw)
In-Reply-To: <8594c7bb-07ed-4c54-8712-5b0d4299b8eb@cs-ware.de> (Sven Strickroth's message of "Mon, 5 Aug 2024 17:50:04 +0200")
Sven Strickroth <email@cs-ware.de> writes:
> Am 05.08.2024 um 12:56 schrieb Sven Strickroth via GitGitGadget:
>> - 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.
Is it "not necessary" or "actively harmful"? It sounds like the
latter?
next prev parent reply other threads:[~2024-08-05 17:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-05 10:56 [PATCH] repository: prevent memory leak when releasing ref stores Sven Strickroth via GitGitGadget
2024-08-05 15:50 ` Sven Strickroth
2024-08-05 17:42 ` Junio C Hamano [this message]
2024-08-05 16:28 ` Junio C Hamano
2024-08-05 17:24 ` Junio C Hamano
2024-08-06 6:20 ` Patrick Steinhardt
2024-08-06 15:44 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa5hq3lzq.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=email@cs-ware.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).