shell: Don't leak weston_touch_move_grab structs

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
dev
Jonas Ådahl 11 years ago committed by Kristian Høgsberg
parent b18018867b
commit 1c6e63e880
  1. 12
      src/shell.c

@ -1130,12 +1130,14 @@ touch_move_grab_down(struct weston_touch_grab *grab, uint32_t time,
static void static void
touch_move_grab_up(struct weston_touch_grab *grab, uint32_t time, int touch_id) touch_move_grab_up(struct weston_touch_grab *grab, uint32_t time, int touch_id)
{ {
struct shell_touch_grab *shell_grab = container_of(grab, struct weston_touch_move_grab *move =
struct shell_touch_grab, (struct weston_touch_move_grab *) container_of(
grab); grab, struct shell_touch_grab, grab);
if (grab->touch->seat->num_tp == 0) if (grab->touch->seat->num_tp == 0) {
shell_touch_grab_end(shell_grab); shell_touch_grab_end(&move->base);
free(move);
}
} }
static void static void

Loading…
Cancel
Save