git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Junio C Hamano
Message 2 of 2 in “mailmap: plug memory leak in read_mailmap_blob()”
  1. mailmap: plug memory leak in read_mailmap_blob()Junio C Hamano, Jul 25, 2024
  2. Jeff KingJul 26, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.