mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 13:29:48 +01:00
core: fix UAF faults around lock surfaces
This commit is contained in:
parent
0bcdca6e7b
commit
87a7255954
2 changed files with 8 additions and 0 deletions
|
@ -31,6 +31,8 @@ CSessionLockSurface::~CSessionLockSurface() {
|
||||||
wl_egl_window_destroy(eglWindow);
|
wl_egl_window_destroy(eglWindow);
|
||||||
ext_session_lock_surface_v1_destroy(lockSurface);
|
ext_session_lock_surface_v1_destroy(lockSurface);
|
||||||
wl_surface_destroy(surface);
|
wl_surface_destroy(surface);
|
||||||
|
if (frameCallback)
|
||||||
|
wl_callback_destroy(frameCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
CSessionLockSurface::CSessionLockSurface(COutput* output) : output(output) {
|
CSessionLockSurface::CSessionLockSurface(COutput* output) : output(output) {
|
||||||
|
@ -116,6 +118,10 @@ void CSessionLockSurface::configure(const Vector2D& size_, uint32_t serial_) {
|
||||||
|
|
||||||
static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) {
|
static void handleDone(void* data, wl_callback* wl_callback, uint32_t callback_data) {
|
||||||
const auto PSURF = (CSessionLockSurface*)data;
|
const auto PSURF = (CSessionLockSurface*)data;
|
||||||
|
|
||||||
|
if (g_pHyprlock->m_bTerminate)
|
||||||
|
return;
|
||||||
|
|
||||||
PSURF->onCallback();
|
PSURF->onCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,6 +239,8 @@ void CHyprlock::run() {
|
||||||
m_sLoopState.timerCV.notify_all();
|
m_sLoopState.timerCV.notify_all();
|
||||||
g_pRenderer->asyncResourceGatherer->notify();
|
g_pRenderer->asyncResourceGatherer->notify();
|
||||||
|
|
||||||
|
m_vOutputs.clear();
|
||||||
|
|
||||||
wl_display_disconnect(m_sWaylandState.display);
|
wl_display_disconnect(m_sWaylandState.display);
|
||||||
|
|
||||||
Debug::log(LOG, "Reached the end, exiting");
|
Debug::log(LOG, "Reached the end, exiting");
|
||||||
|
|
Loading…
Reference in a new issue