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

Re: [patch] possible memory leak in diff.c::diff_free_filepair()

From
Junio C Hamano <junkio@cox.net>
Date
Aug 13, 2005, 19:30 UTC
Message-ID
<7viry9my6k.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<87y876gl1r.wl@mail2.atmark-techno.com>
Yasushi SHOJI <yashi@atmark-techno.com> writes:
Show 6 quoted lines
> When I run git-diff-tree on big change, it seems the command eats so
> much memory.  so I just put git under valgrind to see what's going on.
>
> diff_free_filespec_data() doesn't free diff_filespec itself.  is this
> because in merge_broken() filespec itself is used but fliespec data
> need to be freed?

Thanks for the patch. I am wondering if the same leak exists in diff_free_filepair(), which frees the filespec data without freeing filespec itself for both sides. If this is something you can trap easily with valgrind I would really appreciate it.

Previous: Yasushi SHOJINext: Yasushi SHOJI
Message 2 of 7 in “possible memory leak in diff.c::diff_free_filepair()”
  1. possible memory leak in diff.c::diff_free_filepair()Yasushi SHOJI, Aug 13, 2005
  2. Junio C HamanoAug 13, 2005
  3. Yasushi SHOJIAug 13, 2005
  4. Junio C HamanoAug 13, 2005
  5. Yasushi SHOJIAug 16, 2005
  6. Junio C HamanoAug 16, 2005
  7. Yasushi SHOJIAug 21, 2005

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.