[Commits] SDL: Fixed potential free of uninitialized memory (thanks Simon!)

libsdl.org revision control commits-owner at libsdl.org
Wed Aug 2 10:25:55 PDT 2017


details:   https://hg.libsdl.org/SDL/rev/9397a2d41d6b
changeset: 11176:9397a2d41d6b
user:      Sam Lantinga <slouken at libsdl.org>
date:      Wed Aug 02 10:24:47 2017 -0700
description:
Fixed potential free of uninitialized memory (thanks Simon!)

diffstat:

 src/video/kmsdrm/SDL_kmsdrmvideo.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r cbc6a8a5b701 -r 9397a2d41d6b src/video/kmsdrm/SDL_kmsdrmvideo.c
--- a/src/video/kmsdrm/SDL_kmsdrmvideo.c	Wed Aug 02 10:22:48 2017 -0700
+++ b/src/video/kmsdrm/SDL_kmsdrmvideo.c	Wed Aug 02 10:24:47 2017 -0700
@@ -96,7 +96,7 @@
     device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice));
     if (device == NULL) {
         SDL_OutOfMemory();
-        goto cleanup;
+        return NULL;
     }
 
     /* Initialize internal data */


More information about the commits mailing list