tracing/synthetic: Fix races on freeing last_cmd (CVE-2023-53478) | HOL Guard CVE