kms: Don't leak an EGLImage on every import
This commit is contained in:
parent
eea93d543e
commit
707eace679
1 changed files with 9 additions and 1 deletions
|
|
@ -341,7 +341,15 @@ impl KmsState {
|
||||||
|
|
||||||
let result = egl_display
|
let result = egl_display
|
||||||
.create_image_from_dmabuf(&dmabuf)
|
.create_image_from_dmabuf(&dmabuf)
|
||||||
.map(|_| device.render_node)
|
.map(|image| {
|
||||||
|
unsafe {
|
||||||
|
smithay::backend::egl::ffi::egl::DestroyImageKHR(
|
||||||
|
**egl_display.get_display_handle(),
|
||||||
|
image,
|
||||||
|
);
|
||||||
|
};
|
||||||
|
device.render_node
|
||||||
|
})
|
||||||
.map_err(Into::into);
|
.map_err(Into::into);
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue