diff options
author | Eric Engestrom <eric@engestrom.ch> | 2018-10-19 14:25:36 +0000 |
---|---|---|
committer | Eric Engestrom <eric@engestrom.ch> | 2018-10-19 14:25:36 +0000 |
commit | 00412f84952411fa108dd6ddf1118b429322eda7 (patch) | |
tree | a6422bfd7adaa63a34b3c6c29ce430468c1f2c11 | |
parent | 732cd1b8f65c125e157292d340c487008db7dfb7 (diff) | |
parent | e5411250da60dd3f2b96871a05f90780b5adca10 (diff) |
Merge branch 'fd_close' into 'master'
cube-tex: close the fd after EGLImage creation.
See merge request mesa/kmscube!2
-rw-r--r-- | cube-tex.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -363,6 +363,7 @@ static int init_tex_rgba(void) egl->glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img); egl->eglDestroyImageKHR(egl->display, img); + close(fd); return 0; } @@ -429,6 +430,7 @@ static int init_tex_nv12_2img(void) egl->glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img_y); egl->eglDestroyImageKHR(egl->display, img_y); + close(fd_y); /* UV plane texture: */ img_uv = egl->eglCreateImageKHR(egl->display, EGL_NO_CONTEXT, @@ -443,6 +445,7 @@ static int init_tex_nv12_2img(void) egl->glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img_uv); egl->eglDestroyImageKHR(egl->display, img_uv); + close(fd_uv); return 0; } @@ -499,6 +502,8 @@ static int init_tex_nv12_1img(void) egl->glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, img); egl->eglDestroyImageKHR(egl->display, img); + close(fd_y); + close(fd_uv); return 0; } |