Skip to content

Commit

Permalink
Wayland: touch events, use of memory after it is freed
Browse files Browse the repository at this point in the history
  • Loading branch information
1bsyl committed Oct 30, 2019
1 parent 86ae245 commit 88ba679
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/video/wayland/SDL_waylandevents.c
Expand Up @@ -151,10 +151,14 @@ touch_del(SDL_TouchID id, float* x, float* y, struct wl_surface **surface)
touch_points.tail = tp->prev;
}

SDL_free(tp);
{
struct SDL_WaylandTouchPoint *next = tp->next;
SDL_free(tp);
tp = next;
}
} else {
tp = tp->next;
}

tp = tp->next;
}
}

Expand Down

0 comments on commit 88ba679

Please sign in to comment.