Wayland: touch events, use of memory after it is freed
authorSylvain Becker <sylvain.becker@gmail.com>
Wed, 30 Oct 2019 21:12:36 +0100
changeset 1321159fa401ab8c5
parent 13210 802516cf7035
child 13225 0e512800c68c
Wayland: touch events, use of memory after it is freed
src/video/wayland/SDL_waylandevents.c
     1.1 --- a/src/video/wayland/SDL_waylandevents.c	Wed Oct 30 17:59:20 2019 +0100
     1.2 +++ b/src/video/wayland/SDL_waylandevents.c	Wed Oct 30 21:12:36 2019 +0100
     1.3 @@ -151,10 +151,14 @@
     1.4                  touch_points.tail = tp->prev;
     1.5              }
     1.6  
     1.7 -            SDL_free(tp);
     1.8 +            {
     1.9 +                struct SDL_WaylandTouchPoint *next = tp->next;
    1.10 +                SDL_free(tp);
    1.11 +                tp = next;
    1.12 +            }
    1.13 +        } else {
    1.14 +            tp = tp->next;
    1.15          }
    1.16 -
    1.17 -        tp = tp->next;
    1.18      }
    1.19  }
    1.20