diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2014-01-17 14:00:18 -0800 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2014-01-19 22:15:20 -0800 |
commit | e067b30a1ef92bf2d4bca2618c663c7d3669e233 (patch) | |
tree | bc371695da0214a1bdb2cba68aca8fc24292a149 /src/rpi-renderer.c | |
parent | 2e2384aac5c5811c62fc36c120e5dd9e868bcd5f (diff) |
rpi: free renderer if we bail early during create
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'src/rpi-renderer.c')
-rw-r--r-- | src/rpi-renderer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rpi-renderer.c b/src/rpi-renderer.c index c6b924c6..5642b4f8 100644 --- a/src/rpi-renderer.c +++ b/src/rpi-renderer.c @@ -1742,11 +1742,13 @@ rpi_renderer_create(struct weston_compositor *compositor, renderer->egl_display = eglGetDisplay(EGL_DEFAULT_DISPLAY); if (renderer->egl_display == EGL_NO_DISPLAY) { weston_log("failed to create EGL display\n"); + free(renderer); return -1; } if (!eglInitialize(renderer->egl_display, &major, &minor)) { weston_log("failed to initialize EGL display\n"); + free(renderer); return -1; } @@ -1761,6 +1763,7 @@ rpi_renderer_create(struct weston_compositor *compositor, EGL_EXTENSIONS); if (!extensions) { weston_log("Retrieving EGL extension string failed.\n"); + free(renderer); return -1; } |