[PATCH 5.17 649/772] tracing: Fix potential double free in create_var_ref()