From bc8778854ec874ad563af2fe366c29a7fe3e586d Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 28 Feb 2017 19:48:52 -0500 Subject: [PATCH] raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata. --- src/video/raspberry/SDL_rpivideo.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/video/raspberry/SDL_rpivideo.c b/src/video/raspberry/SDL_rpivideo.c index 9dcf956ef6098..ee32f616f564d 100644 --- a/src/video/raspberry/SDL_rpivideo.c +++ b/src/video/raspberry/SDL_rpivideo.c @@ -59,11 +59,8 @@ RPI_Available(void) static void RPI_Destroy(SDL_VideoDevice * device) { - /* SDL_VideoData *phdata = (SDL_VideoData *) device->driverdata; */ - - if (device->driverdata != NULL) { - device->driverdata = NULL; - } + SDL_free(device->driverdata); + SDL_free(device); } static SDL_VideoDevice *