From 4be066707d9b420248597c2c6d75fa9300a6f1d8 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Wed, 2 Aug 2017 10:24:47 -0700 Subject: [PATCH] Fixed potential free of uninitialized memory (thanks Simon!) --- src/video/kmsdrm/SDL_kmsdrmvideo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c index bdd3597227..ef603579c1 100644 --- a/src/video/kmsdrm/SDL_kmsdrmvideo.c +++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c @@ -96,7 +96,7 @@ KMSDRM_Create(int devindex) device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); if (device == NULL) { SDL_OutOfMemory(); - goto cleanup; + return NULL; } /* Initialize internal data */