Scope: fix memory leak by removing duplicate copy_string() call

The `ID` constructor also calls copy_string().
This commit is contained in:
Max Kellermann 2020-01-28 13:58:51 +01:00
parent 32bb019e3a
commit a458827292

View file

@ -59,7 +59,7 @@ Scope::~Scope()
ID* Scope::GenerateTemporary(const char* name)
{
return new ID(copy_string(name), SCOPE_FUNCTION, false);
return new ID(name, SCOPE_FUNCTION, false);
}
id_list* Scope::GetInits()