diff options
author | Dawid Gajownik <gajownik@gmail.com> | 2015-08-21 00:20:54 -0300 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-08-21 15:00:10 +0300 |
commit | 1a912a9fe333f0b4cd99aab22fc7528e2c0dc91d (patch) | |
tree | f1c5a24f74336088615c86018622a99bc3fa480c /src/gl-renderer.c | |
parent | 89c49b3060a115e846ba1e7fbef94d14894244f2 (diff) | |
download | weston-1a912a9fe333f0b4cd99aab22fc7528e2c0dc91d.tar.gz |
gl-renderer: gl_renderer_create display cleanup on error
Clean up display connection via eglTerminate() in case of EGL
initialisation error.
Signed-off-by: Dawid Gajownik <gajownik@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'src/gl-renderer.c')
-rw-r--r-- | src/gl-renderer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gl-renderer.c b/src/gl-renderer.c index fd0720e2..d7231f40 100644 --- a/src/gl-renderer.c +++ b/src/gl-renderer.c @@ -2649,7 +2649,7 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform, if (egl_choose_config(gr, attribs, visual_id, n_ids, &gr->egl_config) < 0) { weston_log("failed to choose EGL config\n"); - goto fail; + goto fail_terminate; } ec->renderer = &gr->base; @@ -2672,6 +2672,8 @@ gl_renderer_create(struct weston_compositor *ec, EGLenum platform, fail_with_error: gl_renderer_print_egl_error_state(); +fail_terminate: + eglTerminate(gr->egl_display); fail: free(gr); return -1; |