Fix: memory leak after type conversion in geometry nodes group

The leak happened when two things were true:
* Inside of a node group a socket is linked to a Group Input that has
  a different type.
* The corresponding input on the parent Group node is not linked.

The conversion happened correctly, but the original value wasn't
destructed.
This commit is contained in:
Jacques Lucke 2021-10-24 19:26:07 +02:00
parent 665657812d
commit 6f0dd4f0f0
1 changed files with 1 additions and 0 deletions

View File

@ -1455,6 +1455,7 @@ class GeometryNodesEvaluator {
}
void *converted_buffer = allocator.allocate(required_type.size(), required_type.alignment());
this->convert_value(type, required_type, buffer, converted_buffer);
type.destruct(buffer);
return {required_type, converted_buffer};
}