From f00460771efa220e0e811bda121dc78f405189fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 25 Jun 2013 11:19:31 -0400 Subject: [PATCH] compositor: Fix remaining double free()s Previous commit didn't catch all double free()s, hopefully this one does. --- src/compositor.c | 1 - src/data-device.c | 1 - src/shell.c | 4 ---- 3 files changed, 6 deletions(-) diff --git a/src/compositor.c b/src/compositor.c index 7b1e503a..90a92781 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -2512,7 +2512,6 @@ weston_compositor_stack_plane(struct weston_compositor *ec, static void unbind_resource(struct wl_resource *resource) { wl_list_remove(wl_resource_get_link(resource)); - free(resource); } static void diff --git a/src/data-device.c b/src/data-device.c index 5bf14cd8..6e6e7f26 100644 --- a/src/data-device.c +++ b/src/data-device.c @@ -555,7 +555,6 @@ create_data_source(struct wl_client *client, static void unbind_data_device(struct wl_resource *resource) { wl_list_remove(wl_resource_get_link(resource)); - free(resource); } static void diff --git a/src/shell.c b/src/shell.c index 4447995d..9869db5b 100644 --- a/src/shell.c +++ b/src/shell.c @@ -1006,7 +1006,6 @@ static void unbind_resource(struct wl_resource *resource) { wl_list_remove(wl_resource_get_link(resource)); - free(resource); } static void @@ -3614,7 +3613,6 @@ unbind_desktop_shell(struct wl_resource *resource) shell->child.desktop_shell = NULL; shell->prepare_event_sent = false; - free(resource); } static void @@ -3693,7 +3691,6 @@ unbind_screensaver(struct wl_resource *resource) struct desktop_shell *shell = wl_resource_get_user_data(resource); shell->screensaver.binding = NULL; - free(resource); } static void @@ -3916,7 +3913,6 @@ unbind_input_panel(struct wl_resource *resource) struct desktop_shell *shell = wl_resource_get_user_data(resource); shell->input_panel.binding = NULL; - free(resource); } static void