Fix memory leak in DRM

Signed-off-by: Slendi <slendi@socopon.com>
This commit is contained in:
2025-10-02 10:06:42 +03:00
parent f74937bb6a
commit 7a5c305a06
3 changed files with 24 additions and 16 deletions

View File

@@ -266,6 +266,13 @@ void LunarWM_destroy(LunarWM *wm)
LunarWM_wayland_cleanup(wm);
cleanup_lua_cfg(wm);
for (size_t i = 0; i < ARRAY_SZ(wm->wm.workspaces); ++i) {
if (wm->wm.workspaces[i].v_windows) {
vector_free(wm->wm.workspaces[i].v_windows);
wm->wm.workspaces[i].v_windows = NULL;
}
}
memset(wm, 0, sizeof(*wm));
}
@@ -425,10 +432,10 @@ void LunarWM_run(LunarWM *wm)
wlr_log(WLR_ERROR, "Failed to end OpenXR frame");
return;
}
EndDrawing();
} else {
wm->renderer.camera.fovy = 75;
}
EndDrawing();
}
}