Skip to content

Commit 90a734d

Browse files
yashiJunio C Hamano
authored andcommitted
[PATCH] possible memory leak in diff.c::diff_free_filepair()
Here is a patch to fix the problem in the simplest way.
1 parent d57306c commit 90a734d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

diff.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,9 +1010,8 @@ void diff_flush(int diff_output_style, int line_termination)
10101010
diff_flush_name(p, line_termination);
10111011
break;
10121012
}
1013-
}
1014-
for (i = 0; i < q->nr; i++)
10151013
diff_free_filepair(q->queue[i]);
1014+
}
10161015
free(q->queue);
10171016
q->queue = NULL;
10181017
q->nr = q->alloc = 0;

0 commit comments

Comments
 (0)