clipboard: remove the weston_seat destruction listener on destroy
authorRob Bradford <rob@linux.intel.com>
Wed, 24 Jul 2013 15:57:33 +0000 (16:57 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Mon, 29 Jul 2013 23:37:04 +0000 (16:37 -0700)
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

index 7cba751..54f06e6 100644 (file)
@@ -273,6 +273,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);
 }