[PATCH] possible memory leak in diff.c::diff_free_filepair()
Here is a patch to fix the problem in the simplest way.
This commit is contained in:
parent
d57306c794
commit
90a734dc7f
3
diff.c
3
diff.c
@ -1010,9 +1010,8 @@ void diff_flush(int diff_output_style, int line_termination)
|
|||||||
diff_flush_name(p, line_termination);
|
diff_flush_name(p, line_termination);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
for (i = 0; i < q->nr; i++)
|
|
||||||
diff_free_filepair(q->queue[i]);
|
diff_free_filepair(q->queue[i]);
|
||||||
|
}
|
||||||
free(q->queue);
|
free(q->queue);
|
||||||
q->queue = NULL;
|
q->queue = NULL;
|
||||||
q->nr = q->alloc = 0;
|
q->nr = q->alloc = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user