SDL: wayland: Destroy the data source in handle_dnd_finished()

From 6defbc0129b5ba90bab3f6c67bbc1e9329e24ff1 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Wed, 14 Oct 2026 12:05:33 -0400
Subject: [PATCH] wayland: Destroy the data source in handle_dnd_finished()

---
 src/video/wayland/SDL_waylanddatamanager.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/video/wayland/SDL_waylanddatamanager.c b/src/video/wayland/SDL_waylanddatamanager.c
index 339546716e225..e960dba62f71a 100644
--- a/src/video/wayland/SDL_waylanddatamanager.c
+++ b/src/video/wayland/SDL_waylanddatamanager.c
@@ -229,6 +229,10 @@ static void data_source_handle_dnd_drop_performed(void *data, struct wl_data_sou
 
 static void data_source_handle_dnd_finished(void *data, struct wl_data_source *wl_data_source)
 {
+    SDL_WaylandDataSource *source = data;
+    if (source) {
+        Wayland_DataSourceDestroy(source);
+    }
 }
 
 static void data_source_handle_action(void *data, struct wl_data_source *wl_data_source, uint32_t dnd_action)