[PATCH wayland 1/2] text-backend: remove the weston_seat destruction listener on destroy

Kristian Høgsberg hoegsberg at gmail.com
Mon Jul 29 16:41:36 PDT 2013


On Wed, Jul 24, 2013 at 04:57:32PM +0100, Rob Bradford wrote:
> 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

This and 2/2 look good, and I've applied them.  It wasn't clear from
the bug that this was enough though, it sounds like there's still some
linked list corruption in there.  Good catches here though.

Kristian

> ---
>  src/text-backend.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/text-backend.c b/src/text-backend.c
> index 3a1d68c..6c7430c 100644
> --- a/src/text-backend.c
> +++ b/src/text-backend.c
> @@ -792,6 +792,7 @@ input_method_notifier_destroy(struct wl_listener *listener, void *data)
>  		deactivate_text_input(input_method->model, input_method);
>  
>  	wl_global_destroy(input_method->input_method_global);
> +	wl_list_remove(&input_method->destroy_listener.link);
>  
>  	free(input_method);
>  }
> -- 
> 1.8.3.1
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list