[PATCH 6.12 403/423] tracing: Fix use-after-free in print_graph_function_flags during tracer switching