summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Rauch <Rauch.Christian@gmx.de>2021-02-08 16:01:37 -0800
committerChristian Rauch <Rauch.Christian@gmx.de>2021-02-08 16:01:37 -0800
commit0d14d975dd5bd23f445e12c24578035316900433 (patch)
tree824aae9f4d3fd50a7a6cf4fbc7d6c057f2f11f84
parent53ab1bbae34aa81759991b9b5e7da96f4f51e180 (diff)
downloadsdl-0d14d975dd5bd23f445e12c24578035316900433.tar.gz
free the 'display' after it was added to global list
-rw-r--r--src/video/wayland/SDL_waylandvideo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c
index 3ddeef08b..08d69215b 100644
--- a/src/video/wayland/SDL_waylandvideo.c
+++ b/src/video/wayland/SDL_waylandvideo.c
@@ -297,6 +297,10 @@ display_handle_done(void *data,
SDL_AddVideoDisplay(display, SDL_FALSE);
SDL_free(display->name);
+ /* The 'display' content was copied in previous SDL_AddVideoDisplay call.
+ * We have to remove this reference, else it will be lost indefinitely.
+ */
+ SDL_free(display);
}
static void