Commit 4be066707d9b420248597c2c6d75fa9300a6f1d8

Sam Lantinga 2017-08-02T10:24:47

Fixed potential free of uninitialized memory (thanks Simon!)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/video/kmsdrm/SDL_kmsdrmvideo.c b/src/video/kmsdrm/SDL_kmsdrmvideo.c
index bdd3597..ef60357 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 */