X11: Fixed memory leak when initializing multiple screens.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Sat, 05 Dec 2015 17:08:07 +0100
changeset 994488608984f245
parent 9943 373454d9a695
child 9945 09d546e9d8a1
X11: Fixed memory leak when initializing multiple screens.
src/video/x11/SDL_x11modes.c
     1.1 --- a/src/video/x11/SDL_x11modes.c	Fri Dec 04 22:12:36 2015 +0100
     1.2 +++ b/src/video/x11/SDL_x11modes.c	Sat Dec 05 17:08:07 2015 +0100
     1.3 @@ -491,11 +491,11 @@
     1.4                  display.driverdata = displaydata;
     1.5                  SDL_AddVideoDisplay(&display);
     1.6              }
     1.7 +
     1.8 +            X11_XRRFreeScreenResources(res);
     1.9          }
    1.10      }
    1.11  
    1.12 -    X11_XRRFreeScreenResources(res);
    1.13 -
    1.14      if (_this->num_displays == 0) {
    1.15          return SDL_SetError("No available displays");
    1.16      }