forked from enlightenment/enlightenment
use calloc to allocate memory of E_Comp_Wl_Buffer which is set to zero, instead of malloc.
Summary: E_Comp_Wl_Buffer's busy value should be updated after initialization as zero. Reviewers: devilhorns, zmike, raster Reviewed By: devilhorns CC: cedric Differential Revision: https://phab.enlightenment.org/D1011
This commit is contained in:
parent
9f81abb729
commit
2cc4a1cf80
|
@ -44,7 +44,7 @@ _e_comp_wl_buffer_get(struct wl_resource *resource)
|
|||
if (listener)
|
||||
return container_of(listener, E_Comp_Wl_Buffer, destroy_listener);
|
||||
|
||||
if (!(buffer = malloc(sizeof(E_Comp_Wl_Buffer)))) return NULL;
|
||||
if (!(buffer = E_NEW(E_Comp_Wl_Buffer, 1))) return NULL;
|
||||
|
||||
buffer->resource = resource;
|
||||
wl_signal_init(&buffer->destroy_signal);
|
||||
|
|
Loading…
Reference in New Issue