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

Re: [PATCH] read-cache: use of memory after it is freed

From
Duy Nguyen <pclouds@gmail.com>
Date
Oct 20, 2018, 15:15 UTC
Message-ID
<CACsJy8B8q84=AqMvAkc5=oSPBbwMQkdQhRe=RYVKGYmnsGxVGA@mail.gmail.com>
In-Reply-To
<20181020073334.48348-1-carenas@gmail.com>

On Sat, Oct 20, 2018 at 9:33 AM Carlo Marcelo Arenas Belón <carenas@gmail.com> wrote:

Show 20 quoted lines
>
> introduced with c46c406ae1e (trace.h: support nested performance tracing)
> on Aug 18, 2018 but not affecting maint
>
> Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com>
> ---
>  read-cache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/read-cache.c b/read-cache.c
> index 1df5c16dbc..78f47d2f50 100644
> --- a/read-cache.c
> +++ b/read-cache.c
> @@ -2297,8 +2297,8 @@ int read_index_from(struct index_state *istate, const char *path,
>         freshen_shared_index(base_path, 0);
>         merge_base_index(istate);
>         post_read_index_from(istate);
> -       free(base_path);
>         trace_performance_leave("read cache %s", base_path);
> +       free(base_path);
Oops. Ack.
Show 6 quoted lines
>         return ret;
>  }
>
> --
> 2.19.1
>
-- 
Duy
Previous: Carlo Marcelo Arenas BelónNext: Junio C Hamano
Message 2 of 3 in “read-cache: use of memory after it is freed”
  1. read-cache: use of memory after it is freedCarlo Marcelo Arenas Belón, Oct 20, 2018
  2. Duy NguyenOct 20, 2018
  3. Junio C HamanoOct 22, 2018

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.