Explorar o código

Fixed potential free of uninitialized memory (thanks Simon!)

Sam Lantinga %!s(int64=8) %!d(string=hai) anos
pai
achega
4be066707d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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));
     if (device == NULL) {
         SDL_OutOfMemory();
-        goto cleanup;
+        return NULL;
     }
 
     /* Initialize internal data */