raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 28 Feb 2017 19:48:52 -0500
changeset 109225f4b80b748dd
parent 10921 f426dbef4aa0
child 10923 ab8850aa5e19
raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata.
src/video/raspberry/SDL_rpivideo.c
     1.1 --- a/src/video/raspberry/SDL_rpivideo.c	Mon Feb 27 12:20:16 2017 -0800
     1.2 +++ b/src/video/raspberry/SDL_rpivideo.c	Tue Feb 28 19:48:52 2017 -0500
     1.3 @@ -59,11 +59,8 @@
     1.4  static void
     1.5  RPI_Destroy(SDL_VideoDevice * device)
     1.6  {
     1.7 -    /*    SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */
     1.8 -
     1.9 -    if (device->driverdata != NULL) {
    1.10 -        device->driverdata = NULL;
    1.11 -    }
    1.12 +    SDL_free(device->driverdata);
    1.13 +    SDL_free(device);
    1.14  }
    1.15  
    1.16  static SDL_VideoDevice *