Re: [PATCH v3] http API: fix dangling pointer issue noted by GCC 12.0
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Mar 25, 2022, 18:11 UTC
- Message-ID
- <Yj4FwuyEW0b5ImEC@nand.local>
- In-Reply-To
- <patch-v3-1.1-69190804c67-20220325T143322Z-avarab@gmail.com>
On Fri, Mar 25, 2022 at 03:34:49PM +0100, Ævar Arnfjörð Bjarmason wrote:
> This isn't the only caller that assigns to "slot->finished", see see
s/see see/see ?
Show 7 quoted lines
> the assignments in http-walker.c:process_alternates_response() and > http.c:finish_active_slot(). > > But those assignments are both to the pointer to our local variable > here, so this fix is correct. The only way that code in http-walker.c > could have done its assignments is to the pointer to this specific > variable.
Got it; this is the key piece that I was missing in my earlier review. Sorry about that, this looks completely safe to me now.
Thanks, Taylor