diff --git a/src/backends/native/meta-kms-impl-device-atomic.c b/src/backends/native/meta-kms-impl-device-atomic.c index e938e4522..b15f81849 100644 --- a/src/backends/native/meta-kms-impl-device-atomic.c +++ b/src/backends/native/meta-kms-impl-device-atomic.c @@ -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);