mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-11 03:13:39 +02:00
kmsdrm: Fix double-free of GBM surface buffer in atomic mode
(cherry picked from commit c2d0b59f29)
This commit is contained in:
@@ -1712,7 +1712,9 @@ static void KMSDRM_DestroySurfaces(SDL_VideoDevice *_this, SDL_Window *window)
|
||||
/***************************/
|
||||
|
||||
if (windata->bo) {
|
||||
KMSDRM_gbm_surface_release_buffer(windata->gs, windata->bo);
|
||||
if (windata->bo != windata->next_bo) {
|
||||
KMSDRM_gbm_surface_release_buffer(windata->gs, windata->bo);
|
||||
}
|
||||
windata->bo = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user