mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-29 01:08:44 +00:00
kmsdrm: Fix double-free of GBM surface buffer in atomic mode
This commit is contained in:
parent
57f3d2ea0a
commit
c2d0b59f29
1 changed files with 3 additions and 1 deletions
|
|
@ -1708,7 +1708,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue