X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=diffcore-break.c;h=3a7b60a037b2e3c869afe76a23b671cfd5311338;hb=03c6e97f809e5b89089a2c689d6a319e8d471455;hp=d7097bb576cef8900e8e0218ba82e1cc7a87a567;hpb=d1f6c18bd6ea5fd373f9f6356e02854678ffa0fd;p=git.git diff --git a/diffcore-break.c b/diffcore-break.c index d7097bb57..3a7b60a03 100644 --- a/diffcore-break.c +++ b/diffcore-break.c @@ -69,7 +69,7 @@ static int should_break(struct diff_filespec *src, return 0; /* we do not break too small filepair */ if (diffcore_count_changes(src, dst, - NULL, NULL, + &src->cnt_data, &dst->cnt_data, 0, &src_copied, &literal_added)) return 0; @@ -204,12 +204,16 @@ void diffcore_break(int break_score) dp->score = score; dp->broken_pair = 1; + diff_free_filespec_blob(p->one); + diff_free_filespec_blob(p->two); free(p); /* not diff_free_filepair(), we are * reusing one and two here. */ continue; } } + diff_free_filespec_data(p->one); + diff_free_filespec_data(p->two); diff_q(&outq, p); } free(q->queue);