Fixed memory leak in game controller test program.

This commit is contained in:
Philipp Wiesemann 2016-05-05 22:05:21 +02:00
parent 788f608230
commit 62a5ddb862

View file

@ -181,6 +181,8 @@ WatchGameController(SDL_GameController * gamecontroller)
window = SDL_CreateWindow(title, SDL_WINDOWPOS_CENTERED,
SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH,
SCREEN_HEIGHT, 0);
SDL_free(title);
title = NULL;
if (window == NULL) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't create window: %s\n", SDL_GetError());
return SDL_FALSE;