mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-10 21:01:49 +00:00
libdrm/iris: free objects in Drm_call destructor
Make sure to remove all buffers, sync objects, and contexts during destruction. Fixes #4466
This commit is contained in:
parent
d4390adb68
commit
f085fc9dd2
@ -1247,6 +1247,21 @@ class Drm_call
|
||||
Genode::warning("syncobject 0 not reserved");
|
||||
}
|
||||
|
||||
~Drm_call()
|
||||
{
|
||||
while(_buffer_space.apply_any<Buffer>([&] (Buffer &buffer) {
|
||||
_free_buffer(buffer.id());
|
||||
}));
|
||||
|
||||
while (_context_space.apply_any<Drm::Context>([&] (Drm::Context &context) {
|
||||
Libc::close(context.fd());
|
||||
destroy(_heap, &context);
|
||||
}));
|
||||
|
||||
while (_sync_objects.apply_any<Sync_obj>([&] (Sync_obj &obj) {
|
||||
destroy(_heap, &obj); }));
|
||||
}
|
||||
|
||||
int lseek(int fd, off_t offset, int whence)
|
||||
{
|
||||
if (fd != prime_fd || offset || whence != SEEK_END)
|
||||
|
Loading…
x
Reference in New Issue
Block a user