Summary:
Size may be zero while allocating interfaces private data,
when NULL is passed in EVAS_SMART_SUBCLASS_IFACE_NEW for ifaces argument.
If size is 0, then malloc() returns either NULL, or a unique pointer
value that can later be successfully passed to free(). It is implementation
dependent. This case would be likely to occur in case of smart classes with
no interfaces.
@fix
Signed-off-by: Vaibhav Gupta <g.vaibhav1@samsung.com>
Reviewers: raster, Hermet, tasn, cedric
Subscribers: SanghyeonLee, sachin.dev, singh.amitesh, cedric
Differential Revision: https://phab.enlightenment.org/D2679
}
}
+ if (!s->interfaces.size && !total_priv_sz) return;
+
obj = eo_data_scope_get(eo_obj, MY_CLASS);
obj->interface_privates = malloc(s->interfaces.size * sizeof(void *) + total_priv_sz);
if (!obj->interface_privates)