From 068eac91ce04b9aca163acb1927c3878c45d1a07 Mon Sep 17 00:00:00 2001 From: Yasushi SHOJI Date: Sat, 13 Aug 2005 19:58:56 +0900 Subject: [PATCH] plug memory leak in diff.c::diff_free_filepair() 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. [jc: I ended up doing things slightly differently from Yasushi's patch. The original idea was to use free_filespec_data() only to free the data portion and keep useing the filespec itself, but no existing code seems to do things that way, so I just yanked that part out.] Signed-off-by: Yasushi SHOJI Signed-off-by: Junio C Hamano --- diffcore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'diffcore.h') diff --git a/diffcore.h b/diffcore.h index f1b5ca748c..633d1ae5cf 100644 --- a/diffcore.h +++ b/diffcore.h @@ -43,7 +43,7 @@ extern void fill_filespec(struct diff_filespec *, const unsigned char *, unsigned short); extern int diff_populate_filespec(struct diff_filespec *, int); -extern void diff_free_filespec_data(struct diff_filespec *); +extern void diff_free_filespec(struct diff_filespec *); struct diff_filepair { struct diff_filespec *one; -- cgit v1.2.3