[PATCH 4/5] Attempt to free plot data entries regardless of printer state

Linus Torvalds torvalds at linux-foundation.org
Sun Dec 16 15:08:38 PST 2012


On Sun, Dec 16, 2012 at 2:26 PM, Lubomir I. Ivanov <neolit123 at gmail.com> wrote:
> From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
>
> profile.c:plot() does take care of freeing the previously allocated array
> of "struct plot_data" entries, but only if the "printer" flag in
> gc (struct graphics_context) is set.

This is wrong.

We actually need the plot_data for the tooltip logic. Which is why
it's only free'd for printers - which obviously don't have tooltips.

We're supposed to free it on the next iteration when we create a new
one, so that there is always just one "outstanding" allocation of
plot_info values. But I didn't check if that's actually the case, I
might have screwed that up.

           Linus


More information about the subsurface mailing list