Wayland: Fixed memory leak if output retrieval failed.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Wed, 16 Nov 2016 22:09:40 +0100
changeset 1061801ff51434145
parent 10617 346c02ff71b6
child 10619 8786a8d1088e
Wayland: Fixed memory leak if output retrieval failed.

Found by Cppcheck.
src/video/wayland/SDL_waylandvideo.c
     1.1 --- a/src/video/wayland/SDL_waylandvideo.c	Wed Nov 16 22:08:51 2016 +0100
     1.2 +++ b/src/video/wayland/SDL_waylandvideo.c	Wed Nov 16 22:09:40 2016 +0100
     1.3 @@ -271,6 +271,7 @@
     1.4      output = wl_registry_bind(d->registry, id, &wl_output_interface, 2);
     1.5      if (!output) {
     1.6          SDL_SetError("Failed to retrieve output.");
     1.7 +        SDL_free(display);
     1.8          return;
     1.9      }
    1.10