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

Re: [PATCH] commit-graph: avoid memory leaks

From
Junio C Hamano <gitster@pobox.com>
Date
May 4, 2020, 21:09 UTC
Message-ID
<xmqq8si7flw0.fsf@gitster.c.googlers.com>
In-Reply-To
<20200504191324.201663-1-jonathantanmy@google.com>
Jonathan Tan <jonathantanmy@google.com> writes:
Show 15 quoted lines
> A fuzzer running on the entry point provided by fuzz-commit-graph.c
> revealed a memory leak when parse_commit_graph() creates a struct
> bloom_filter_settings and then returns early due to error. Fix that
> error by always freeing that struct first (if it exists) before
> returning early due to error.
>
> While making that change, I also noticed another possible memory leak -
> when the BLOOMDATA chunk is provided but not BLOOMINDEXES. Also fix that
> error.
>
> Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
> ---
> Here's a memory leak fix revealed by a fuzzer running at $DAYJOB, and
> another one that I noticed while making that fix.
> ---
Thanks.  The patch looks good.
Will queue.
Previous: Taylor Blau
Message 4 of 4 in “commit-graph: avoid memory leaks”
  1. commit-graph: avoid memory leaksJonathan Tan, May 4, 2020
  2. Derrick StoleeMay 4, 2020
  3. Taylor BlauMay 4, 2020
  4. Junio C HamanoMay 4, 2020

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.