Browse Source

line-log.c: fix a memleak

The `filepair` is assigned new memory with any iteration via
process_diff_filepair, so free it before the current iteration ends.

Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Stefan Beller 10 years ago committed by Junio C Hamano
parent
commit
05bfc7dcaa
  1. 1
      line-log.c

1
line-log.c

@ -1099,6 +1099,7 @@ static int process_all_files(struct line_log_data **range_out, @@ -1099,6 +1099,7 @@ static int process_all_files(struct line_log_data **range_out,
rg->pair = diff_filepair_dup(queue->queue[i]);
memcpy(&rg->diff, pairdiff, sizeof(struct diff_ranges));
}
free(pairdiff);
}

return changed;

Loading…
Cancel
Save