eina_value_copy assume the given Eina_Value as target is not initialized
when it copy the source in it. In eina_value_reference_copy we were initialising
before calling eina_value_copy which would then override and leak the internal
pointer no fault of the users.
Depends on D9942
Details
Details
Diff Detail
Diff Detail
- Repository
- rEFL core/efl
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
I don't really see how this avoids a leak since eina_value_copy already calls eina_value_setup internally, but it does remove a redundancy.
Comment Actions
The double setup trigger a double allocation as it assume the value isn't allocated/initialized and has no way to know.