Browse Source

Fixed potential free of uninitialized memory (thanks Simon!)

Sam Lantinga 8 years ago
parent
commit
4be066707d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/video/kmsdrm/SDL_kmsdrmvideo.c

+ 1 - 1
src/video/kmsdrm/SDL_kmsdrmvideo.c

@@ -96,7 +96,7 @@ KMSDRM_Create(int devindex)
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (device == NULL) {
     if (device == NULL) {
         SDL_OutOfMemory();
         SDL_OutOfMemory();
-        goto cleanup;
+        return NULL;
     }
     }
 
 
     /* Initialize internal data */
     /* Initialize internal data */