vrend: fix a potential egl_image leak

egl_image always wraps gbm_bo so far so this is not a real issue.  But
it will change soon.

Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Gert Wollny <gert.wollny@collabora.com>
macos/master
Chia-I Wu 4 years ago
parent 1f36f00ad6
commit e9de44ea19
  1. 4
      src/vrend_renderer.c

@ -7039,7 +7039,7 @@ void vrend_renderer_resource_destroy(struct vrend_resource *res)
glDeleteMemoryObjectsEXT(1, &res->memobj);
}
#ifdef ENABLE_MINIGBM_ALLOCATION
#if HAVE_EPOXY_EGL_H
if (res->egl_image) {
virgl_egl_image_destroy(egl, res->egl_image);
for (unsigned i = 0; i < ARRAY_SIZE(res->aux_plane_egl_image); i++) {
@ -7048,6 +7048,8 @@ void vrend_renderer_resource_destroy(struct vrend_resource *res)
}
}
}
#endif
#ifdef ENABLE_MINIGBM_ALLOCATION
if (res->gbm_bo)
gbm_bo_destroy(res->gbm_bo);
#endif

Loading…
Cancel
Save