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:
Seunghun Lee 2014-06-12 09:09:41 -04:00 committed by Chris Michael
parent 9f81abb729
commit 2cc4a1cf80
1 changed files with 1 additions and 1 deletions

View File

@ -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);