From: Jeff King Date: Fri, 26 Jul 2024 04:44:03 GMT Subject: Re: [PATCH] mailmap: plug memory leak in read_mailmap_blob() Message-ID: <20240726044403.GB642208@coredump.intra.peff.net> In-Reply-To: On Thu, Jul 25, 2024 at 04:12:41PM -0700, Junio C Hamano wrote: > 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