[PATCH OLK-6.6] tracing: Fix use-after-free in print_graph_function_flags during tracer switching