mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
kms/impl-device/atomic: Don't leak drm commit request on error
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2853>
This commit is contained in:
parent
06ef07f322
commit
0b325d64f4
@ -1019,7 +1019,6 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
|
||||
|
||||
fd = meta_kms_impl_device_get_fd (impl_device);
|
||||
ret = drmModeAtomicCommit (fd, req, commit_flags, impl_device);
|
||||
drmModeAtomicFree (req);
|
||||
if (ret < 0)
|
||||
{
|
||||
g_set_error (&error, G_IO_ERROR, g_io_error_from_errno (-ret),
|
||||
@ -1027,6 +1026,8 @@ meta_kms_impl_device_atomic_process_update (MetaKmsImplDevice *impl_device,
|
||||
goto err;
|
||||
}
|
||||
|
||||
drmModeAtomicFree (req);
|
||||
|
||||
process_entries (impl_device,
|
||||
update,
|
||||
req,
|
||||
@ -1055,6 +1056,9 @@ err:
|
||||
NULL);
|
||||
}
|
||||
|
||||
if (req)
|
||||
drmModeAtomicFree (req);
|
||||
|
||||
release_blob_ids (impl_device, blob_ids);
|
||||
|
||||
return meta_kms_feedback_new_failed (failed_planes, error);
|
||||
|
Loading…
Reference in New Issue
Block a user