Skip to content

Ticket #447: Clear SOPC_AddressSpaceItem values in SOPC_AddressSpace_Delete

Adrien requested to merge aby-fix-value-leak into master

When using an embedded address space, the items should not be freed, since they where not malloced. Their values however can have been modified at runtime, and need to be freed in any case.

We address this by setting the "DoNotClear" flag on item values embedded in the binary, this flag gets reset when the value is changed at runtime. By setting the SOPC_Dict from the address space to clear all values in its free function, we ensure that all malloc'ed values are cleared when the address space is freed.

Closes #447 (closed)

Edited by Vincent Monfort

Merge request reports