tracing: Fix use-after-free in hist_unreg_all/hist_enable_unreg_all