devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=82e155eac68cb8b1c21379299bca4b71cd98c612
commit 82e155eac68cb8b1c21379299bca4b71cd98c612 Author: Bryce Harrington <br...@osg.samsung.com> Date: Fri Feb 27 09:18:27 2015 -0500 wayland: Fix missing check on E_NEW return Summary: All other E_NEW calls in this file check the return value, except this one place. In this function, other calls are being checked for NULL and handled so this one should as well. The other handlers in this function follow the style of issuing an error message, freeing objects, and returning false; we don't need to free anything so just do the error message and return. Reviewers: zmike, cedric, devilhorns Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D2065 --- src/bin/e_comp_wl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 722a598..79256fd 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -2363,7 +2363,11 @@ _e_comp_wl_compositor_create(void) } /* create new compositor data */ - cdata = E_NEW(E_Comp_Data, 1); + if (!(cdata = E_NEW(E_Comp_Data, 1))) + { + ERR("Could not create compositor data: %m"); + return EINA_FALSE; + } /* set compositor wayland data */ comp->wl_comp_data = cdata; @@ -2738,9 +2742,7 @@ e_comp_wl_buffer_get(struct wl_resource *resource) return container_of(listener, E_Comp_Wl_Buffer, destroy_listener); if (!(shmbuff = wl_shm_buffer_get(resource))) return NULL; - - buffer = E_NEW(E_Comp_Wl_Buffer, 1); - if (!buffer) return NULL; + if (!(buffer = E_NEW(E_Comp_Wl_Buffer, 1))) return NULL; buffer->w = wl_shm_buffer_get_width(shmbuff); buffer->h = wl_shm_buffer_get_height(shmbuff); --