From: Junio C Hamano Date: Thu, 10 Sep 2026 03:15:51 GMT Subject: Re: [PATCH v9 4/4] hook: introduce the receive-report hook Message-ID: In-Reply-To: <20260909-758-introduce-hook-v9-4-3043d417e0ee@gmail.com> Karthik Nayak writes: > +static void override_cmds_error(struct command *commands, const char *err) > +{ > + for (struct command *cmd = commands; cmd; cmd = cmd->next) > + cmd->error_string = err; > +} Doesn't this leak existing cmd->error_string if it is owned? In other words, something like for (struct command *cmd = commands; cmd; cmd = cmd->next) { if (cmd->error_string_owned) FREE_AND_NULL(cmd->error_string_owned); cmd->error_string = err; } is in order, perhaps?