Eric Sunshine <sunsh...@sunshineco.com> writes:

> @@ -750,6 +751,20 @@ void show_log(struct rev_info *opt)
>  
>               memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
>       }
> +
> +     if (cmit_fmt_is_mail(ctx.fmt) && opt->rdiff1) {
> +             struct diff_queue_struct dq;
> +
> +             memcpy(&dq, &diff_queued_diff, sizeof(diff_queued_diff));
> +             DIFF_QUEUE_CLEAR(&diff_queued_diff);
> +
> +             next_commentary_block(opt, NULL);
> +             fprintf_ln(opt->diffopt.file, "%s", opt->rdiff_title);
> +             show_range_diff(opt->rdiff1, opt->rdiff2,
> +                             opt->creation_factor, 1, &opt->diffopt);
> +
> +             memcpy(&diff_queued_diff, &dq, sizeof(diff_queued_diff));
> +     }
>  }
>  
>  int log_tree_diff_flush(struct rev_info *opt)

This essentially repeats what is already done for "interdiff".

Does the global diff_queued_diff gets cleaned up when
show_interdiff() and show_range_diff() return, like diff_flush()
does?  Otherwise we'd be leaking the filepairs accumulated in the
diff_queued_diff.

Reply via email to