diff options
Diffstat (limited to 'src/gallium/auxiliary/hud/hud_cpu.c')
-rw-r--r-- | src/gallium/auxiliary/hud/hud_cpu.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/hud/hud_cpu.c b/src/gallium/auxiliary/hud/hud_cpu.c index ce98115d542..cd20deec9bd 100644 --- a/src/gallium/auxiliary/hud/hud_cpu.c +++ b/src/gallium/auxiliary/hud/hud_cpu.c @@ -116,6 +116,12 @@ query_cpu_load(struct hud_graph *gr) } } +static void +free_query_data(void *p) +{ + FREE(p); +} + void hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index) { @@ -144,7 +150,11 @@ hud_cpu_graph_install(struct hud_pane *pane, unsigned cpu_index) } gr->query_new_value = query_cpu_load; - gr->free_query_data = free; + + /* Don't use free() as our callback as that messes up Gallium's + * memory debugger. Use simple free_query_data() wrapper. + */ + gr->free_query_data = free_query_data; info = gr->query_data; info->cpu_index = cpu_index; |