Fix potential leak in camera example

This commit is contained in:
Petar Popovic
2026-04-21 10:51:43 +02:00
committed by Ryan C. Gordon
parent 1675c8267e
commit eacfe835e7

View File

@@ -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;
}