From: Yasushi SHOJI Date: Sun, 21 Aug 2005 07:14:16 +0000 (+0900) Subject: [PATCH] possible memory leak in diff.c::diff_free_filepair() X-Git-Tag: v0.99.5~7^2~1 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=90a734dc7f37a7bd1f3beec4d33acad559360f6c;p=git.git [PATCH] possible memory leak in diff.c::diff_free_filepair() Here is a patch to fix the problem in the simplest way. --- diff --git a/diff.c b/diff.c index bb2a43b5b..137d0d0c0 100644 --- a/diff.c +++ b/diff.c @@ -1010,9 +1010,8 @@ void diff_flush(int diff_output_style, int line_termination) diff_flush_name(p, line_termination); break; } - } - for (i = 0; i < q->nr; i++) diff_free_filepair(q->queue[i]); + } free(q->queue); q->queue = NULL; q->nr = q->alloc = 0;