compositor: Remove double free()s in resource destructors
With the change to move free()ing of the wl_resource into wayland-server, we now have a few cases where we double free the resource in the destructor. This patch removes those.
This commit is contained in:
@@ -2206,8 +2206,6 @@ subsurface_resource_destroy(struct wl_resource *resource)
|
|||||||
|
|
||||||
if (sub)
|
if (sub)
|
||||||
weston_subsurface_destroy(sub);
|
weston_subsurface_destroy(sub);
|
||||||
|
|
||||||
free(resource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
@@ -40,7 +40,6 @@ empty_region(pixman_region32_t *region)
|
|||||||
static void unbind_resource(struct wl_resource *resource)
|
static void unbind_resource(struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
wl_list_remove(wl_resource_get_link(resource));
|
wl_list_remove(wl_resource_get_link(resource));
|
||||||
free(resource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -533,8 +533,6 @@ unbind_keyboard(struct wl_resource *resource)
|
|||||||
|
|
||||||
input_method_context_end_keyboard_grab(context);
|
input_method_context_end_keyboard_grab(context);
|
||||||
context->keyboard = NULL;
|
context->keyboard = NULL;
|
||||||
|
|
||||||
free(resource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -746,8 +744,6 @@ unbind_input_method(struct wl_resource *resource)
|
|||||||
input_method->context = NULL;
|
input_method->context = NULL;
|
||||||
|
|
||||||
text_backend->input_method.binding = NULL;
|
text_backend->input_method.binding = NULL;
|
||||||
|
|
||||||
free(resource);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user