infra: fix minor memory leak in "api trace..."