forked from enlightenment/efl
eo: only really copy when there is content
otherwise we are allocating a 0 sized memory element, which is pointless. ASAN would report a 0 sized allocated but not freed element as a leak. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11577
This commit is contained in:
parent
9762d75dc4
commit
8f09cf9dd3
|
@ -285,6 +285,9 @@ _vtable_merge_defined_api(Eo_Vtable *dest, const Eo_Vtable *src, Eina_Bool *hitm
|
||||||
if (!hitmap[i])
|
if (!hitmap[i])
|
||||||
{
|
{
|
||||||
const Eo_Vtable_Node node = dest->chain[i];
|
const Eo_Vtable_Node node = dest->chain[i];
|
||||||
|
if (!node.count)
|
||||||
|
_vtable_insert_empty_funcs(dest, i);
|
||||||
|
else
|
||||||
_vtable_copy_node(&dest->chain[i], &node); //we copy what we have, and overwrite in the later for loop
|
_vtable_copy_node(&dest->chain[i], &node); //we copy what we have, and overwrite in the later for loop
|
||||||
hitmap[i] = EINA_TRUE;
|
hitmap[i] = EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue