Procházet zdrojové kódy

Fix potential leak in camera example

Petar Popovic před 2 týdny
rodič
revize
eacfe835e7

+ 1 - 0
examples/camera/01-read-and-draw/read-and-draw.c

@@ -44,6 +44,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
         return SDL_APP_FAILURE;
     } else if (devcount == 0) {
         SDL_Log("Couldn't find any camera devices! Please connect a camera and try again.");
+        SDL_free(devices);
         return SDL_APP_FAILURE;
     }