[PATCH wayland 2/2] clipboard: remove the weston_seat destruction listener on destroy

Rob Bradford robert.bradford at intel.com
Wed Jul 24 08:57:33 PDT 2013


From: Rob Bradford <rob at linux.intel.com>

Prior to freeing the memory in which the link node for the signal is
emedded we should remove the link node from the list to prevent the list
from being corrupted.

https://bugs.freedesktop.org/show_bug.cgi?id=67231
---
 src/clipboard.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/clipboard.c b/src/clipboard.c
index 21a7e69..3a9e5aa 100644
--- a/src/clipboard.c
+++ b/src/clipboard.c
@@ -250,6 +250,7 @@ clipboard_destroy(struct wl_listener *listener, void *data)
 		container_of(listener, struct clipboard, destroy_listener);
 
 	wl_list_remove(&clipboard->selection_listener.link);
+	wl_list_remove(&clipboard->destroy_listener.link);
 
 	free(clipboard);
 }
-- 
1.8.3.1



More information about the wayland-devel mailing list