From: Junio C Hamano Date: Sat, 13 Aug 2005 19:30:59 GMT Subject: Re: [patch] possible memory leak in diff.c::diff_free_filepair() Message-ID: <7viry9my6k.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <87y876gl1r.wl@mail2.atmark-techno.com> Yasushi SHOJI writes: > 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.