fix "path" double freeing