diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-03-30 20:07:53 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-03-31 16:35:27 +0200 |
commit | 630ca2e18fc63c3e144f11b54faf70228d4d2e92 (patch) | |
tree | d86e26cb53687a79e823b392e186144286d6cf92 /src/libply-splash-core | |
parent | fbe2b79da56cf0a4b7ed5ca4754449ab4875b40f (diff) |
ply-device-manager: Don't deactivate renderers from ply_device_manager_free ()
Don't deactivate renderers from ply_device_manager_free (),
ply_device_manager_free () is only ever called with the renderers still
active on a "plymouth quit --retain-splash".
Since the splash is being retained in this case the renderers should not be
deactivated. Normally this does not matter because plymouthd exits almost
immediately afterwards and the kernels will close the renderers fds on exit.
But with the upcoming plymouthd-drm-escrow binary which keeps the renderers
fds open, not deactivate renderers; and thus not dropping DRM master rights
does make a difference.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src/libply-splash-core')
-rw-r--r-- | src/libply-splash-core/ply-device-manager.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/libply-splash-core/ply-device-manager.c b/src/libply-splash-core/ply-device-manager.c index db843fc7..aed7bac2 100644 --- a/src/libply-splash-core/ply-device-manager.c +++ b/src/libply-splash-core/ply-device-manager.c @@ -189,11 +189,16 @@ free_devices_from_device_path (ply_device_manager_t *manager, ply_hashtable_remove (manager->renderers, (void *) device_path); free (key); - if (manager->renderers_activated) - ply_renderer_deactivate (renderer); + /* + * Close is false when called from ply_device_manager_free (), in this + * case we don't deactivate / close for retain-splash purposes. + */ + if (close) { + if (manager->renderers_activated) + ply_renderer_deactivate (renderer); - if (close) ply_renderer_close (renderer); + } ply_renderer_free (renderer); } |