Re: [PATCH] mailmap: plug memory leak in read_mailmap_blob()
- From
Jeff King <peff@peff.net>
- Date
- Jul 26, 2024, 04:44 UTC
- Message-ID
- <20240726044403.GB642208@coredump.intra.peff.net>
- In-Reply-To
- <xmqqcyn112xi.fsf@gitster.g>
On Thu, Jul 25, 2024 at 04:12:41PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> When a named object to read mailmap from is not a blob, the code
> correctly errors out, but it forgot to free the object data before
> doing so.
> [..]
> - if (type != OBJ_BLOB)
> + if (type != OBJ_BLOB) {
> + free(buf);
> return error("mailmap is not a blob: %s", name);
> + }Looks obviously correct. This one is almost certainly my fault.
-Peff