~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_patiencediff_c.c

  • Committer: Lukáš Lalinský
  • Date: 2008-08-17 19:39:54 UTC
  • mto: (3650.1.1 bzr.ab.integration)
  • mto: This revision was merged to the branch mainline in revision 3651.
  • Revision ID: lalinsky@gmail.com-20080817193954-xtx7t19otspm7aac
Actually free the data in delete_lines

Show diffs side-by-side

added added

removed removed

Lines of Context:
544
544
static void
545
545
delete_lines(struct line *lines, Py_ssize_t size)
546
546
{
 
547
    struct line *line = lines;
547
548
    while (size-- > 0) {
548
 
        Py_XDECREF(lines->data);
549
 
        lines++;
 
549
        Py_XDECREF(line->data);
 
550
        line++;
550
551
    }
 
552
    free(lines);
551
553
}
552
554
 
553
555
 
596
598
    if (size == -1) {
597
599
        /* Error -- cleanup unused object references */
598
600
        delete_lines(*lines, i);
 
601
        *lines = NULL;
599
602
    }
600
603
    return size;
601
604
}