diff --git a/line-log.c b/line-log.c index 7a74daf2e8..a7f3e7f6ce 100644 --- a/line-log.c +++ b/line-log.c @@ -1089,10 +1089,8 @@ static struct diff_filepair *diff_filepair_dup(struct diff_filepair *pair) static void free_diffqueues(int n, struct diff_queue_struct *dq) { - int i, j; - for (i = 0; i < n; i++) - for (j = 0; j < dq[i].nr; j++) - diff_free_filepair(dq[i].queue[j]); + for (int i = 0; i < n; i++) + diff_free_queue(&dq[i]); free(dq); }