mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-27 10:57:22 +08:00
Fix potential leak in camera example
(cherry picked from commit eacfe835e7)
This commit is contained in:
committed by
Ryan C. Gordon
parent
ab6bc13ef1
commit
7bd84b29e9
@@ -44,6 +44,7 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char *argv[])
|
|||||||
return SDL_APP_FAILURE;
|
return SDL_APP_FAILURE;
|
||||||
} else if (devcount == 0) {
|
} else if (devcount == 0) {
|
||||||
SDL_Log("Couldn't find any camera devices! Please connect a camera and try again.");
|
SDL_Log("Couldn't find any camera devices! Please connect a camera and try again.");
|
||||||
|
SDL_free(devices);
|
||||||
return SDL_APP_FAILURE;
|
return SDL_APP_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user